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!
|
|
|
 |
|