Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Jmail wont work after insert record

Posted 18 Jun 2004 12:49:05
1
has voted
18 Jun 2004 12:49:05 tony ton posted:
i am try to get activation code sent out for new user. Is my code correct? Is there a better way to do this.

I have a page with a form. I want to insert the data from the form into a new recordset and then afterwards mailing some data from the form with jmail to a certain adress. Somehow i cant retrieve the data from the form.

newuser.asp
<!--#include file="SendMail.asp" --> If (MM_editRedirectUrl <> "" Then
If fSendEmail(Request.Form("Email", Request.Form("ActivationCode") Then
'Mail was a success
Response.Redirect(MM_editRedirectUrl)
Else

'Mail didn't succeed

Response.Redirect("error.asp"

End If

End If
End If

End If
%>
form name="form1" method="POST" action="<%=MM_editAction%>">
sendmail.asp

Function fSendEmail(strUserEmail, strActivateCode)
set msg = Server.CreateOBject( "JMail.SMTPMail" )
msg.ServerAddress = "192.168.1.20:25"
msg.From = " "
msg.FromName = "Webmaster"
msg.AddRecipient = strUserEmail
msg.Subject = "New User Registration"
msg.Body = "Thank you for signing up to www.mydomain.com/, in order for us to confirm your details please click on this link… www.mydomain.com/confirm.asp?email=" & strUserEmail & "&activatecode=" & strActivateCode

msg.Execute
End Function
%>



Replies

Replied 18 Jun 2004 16:41:01
18 Jun 2004 16:41:01 Dave Thomas replied:
never used jmail personally but why have you got 2 IF statements and 4 END IF statements?

Regards,
Dave

[img]www.nova-cs.co.uk/DmxAvatar.jpg" border="0">

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
Replied 19 Jun 2004 02:17:28
19 Jun 2004 02:17:28 tony ton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
never used jmail personally but why have you got 2 IF statements and 4 END IF statements?

Regards,
Dave

[img]www.nova-cs.co.uk/DmxAvatar.jpg" border="0"&gt;

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
the end if (s) for the insert record on that dreamweaver wrote on my form action.

the second if is to call sendmail.asp because the form action is use for records. The problem is that i cant call sendemail.asp in form action after insert. is there a better way of doing this.

thanks,
Tony

Reply to this topic