CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Dlookup probs..

Print topic Send  topic

Author Message
Sean
Posted: 04/02/2002, 1:26 PM

Hi All, I'm having some probs with this email function and was hoping someone could enlighten me on this probably simple issue ;) The email sends fine if I set the 'to' email address to mine, but it's not grabbing the fields from the User table. It displays the tutorial info fine. Any ideas?


if fldValidated=1 then
Dim struser_email
Dim struser_name
Dim strlink_title
Dim strlink_desc
Dim strlink_url

struser_email = DLookup("User","Email","UID=" & Session("UserID"))
struser_name = DLookup("User","Name","UID=" & Session("UserID"))
strlink_title = Request("Title")
strlink_desc = Request ("Description")
strlink_url = Request ("Link")

' **** This sends an e-mail to the client ****

dim objMsg,strBody
dim ele
dim k
Set objMsg = Server.CreateObject("CDONTS.NewMail")

objMsg.From = "pixelhead@rainworld.com"
objMsg.To = ""& struser_email &""
objMsg.Subject = "PS Workshop - Tutorial Validated"

strbody = strbody & "Hello, the tutorial you submitted to PS Workshop has been validated." & CHR(13) & _
"Thank you," & CHR(13) & _
"The staff at PS Workshop" & CHR(13) & _
"===============================" & CHR(13) & _
"VALIDATED TUTORIAL INFO:" & CHR(13) & _
"Title: " & strlink_title & CHR(13) & _
"Description: " & strlink_desc & CHR(13) & _
"URL: " & strlink_url & CHR(13)

objMsg.Body = strBody

objMsg.Send
Set objMsg = nothing
end if
Jon
Posted: 04/02/2002, 3:05 PM

Looks like the same problems I'm having with dlookup. Hope someone can figure this out.
Nicole
Posted: 04/03/2002, 12:45 AM

Sean,
make sure that session variable UserID is not empty (the page has security level different to 'No authentication'). Try to print struser_email variable right after dlookup. What is its value?
Also try to use:
objMsg.To = struser_email
Sean
Posted: 04/03/2002, 12:25 PM

Thanks Nicole!

I got it working by changing these lines to:

struser_name = DLookup("User","Name","UID")
struser_email = DLookup("User","Email","UID")

Now if I can get it to send a different message if fldValidated=0 .. I'd be set ;)
Sean
Posted: 04/03/2002, 1:26 PM

It's all working swell now...thanx guys!

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.