Forums
This topic is locked
convert mailscript from jmail to cdonts
Posted 02 Nov 2006 09:47:51
1
has voted
02 Nov 2006 09:47:51 Dave Clarke posted:
don't know if this is the right forum for this but here goes.i have a jmail script that i need converting to cdonts (clients host wont install jmail)
i have no experience with cdonts so i was hoping someone can convert it for me
<pre id=code><font face=courier size=2 id=code>
<%
firstname = request.querystring("newfirstname"
lastname = request.querystring("newlastname"
emailadd = Replace(request.querystring("newemailaddress"," ",""
username = request.querystring("newusername"
password = request.querystring("newpassword"
usrid = request.querystring("newuserid"
Session("MM_Username"=request.querystring("newusername"
Session("MM_UserAuthorization"="Guest"
if emailadd ="" or instr(emailadd,"@"=0 then response.redirect("welcomenewmemb2.asp"
crlf=chr(13)+chr(10)
tab=chr(9)
tab2=chr(9)+chr(9)
tab3=chr(9)+chr(9)+chr(9)
tab4=chr(9)+chr(9)+chr(9)+chr(9)
Set JMail = Server.CreateObject("JMail.SMTPMail"
JMail.ClearRecipients
JMail.body = ""
JMail.ServerAddress = "www6.domain.com"
JMail.Sender = " "
JMail.Subject = "Your Membership Details"
JMail.AddRecipient emailadd
JMail.Body = "Hello" & tab & firstname & tab & lastname & tab2 & "Welcome To www.domain.com" & crlf & crlf
JMail.appendtext "This is an automated email, please do not reply to it" & crlf & crlf
JMail.appendtext "Here are your membership details" & crlf & crlf
JMail.appendtext "Username" & tab2 & username & crlf
JMail.appendtext "Password" & tab2 & password & crlf
JMail.appendtext "Click this link to confirm your membership" & tab2 & "www.domain.com/confirm.asp?" & "usname="&username & "&email="&emailadd &"&passwrd="&password &"&usrid="&usrid & crlf & crlf
Jmail.appendtext "If your mail reader does not allow you to click the link you will have to copy and paste it into your web browsers address bar" & crlf & crlf
JMail.appendtext "Do not forget that you must do this within 14 days or you will be deleted from the database"
JMail.Priority = 1
JMail.Execute
response.redirect("welcomenewmemb.asp"
%>
</font id=code></pre id=code>
Thanks
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk
Replies
Replied 08 Nov 2006 16:42:47
08 Nov 2006 16:42:47 Steve Bedder replied:
Here you go, this example should help, CDONTS is pretty self explanatory.....
<%
Dim MyCDONTSMail2
Dim HTML
Set MyCDONTSMail2 = CreateObject("CDONTS.NewMail"
HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Sending CDONTS Email Using HTML</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""FFFFFF"">"
HTML = HTML & "<p><font size =""3"" face=""Arial""><strong>"
HTML = HTML & "Name Of Store</strong><br>"
HTML = HTML & "Incoming Customer Order</strong></p>"
HTML = HTML & "<p align = ""center"">Bla Bla Bla Bla Bla</p>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
MyCDONTSMail2.From= " "
MyCDONTSMail2.To=" "
MyCDONTSMail2.Subject="Incoming Customer Order"
MyCDONTSMail2.BodyFormat=0
MyCDONTSMail2.MailFormat=0
MyCDONTSMail2.Body=HTML
MyCDONTSMail2.Send
set MyCDONTSMail2=nothing
%>
HTH
SteveB
<%
Dim MyCDONTSMail2
Dim HTML
Set MyCDONTSMail2 = CreateObject("CDONTS.NewMail"
HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Sending CDONTS Email Using HTML</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""FFFFFF"">"
HTML = HTML & "<p><font size =""3"" face=""Arial""><strong>"
HTML = HTML & "Name Of Store</strong><br>"
HTML = HTML & "Incoming Customer Order</strong></p>"
HTML = HTML & "<p align = ""center"">Bla Bla Bla Bla Bla</p>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
MyCDONTSMail2.From= " "
MyCDONTSMail2.To=" "
MyCDONTSMail2.Subject="Incoming Customer Order"
MyCDONTSMail2.BodyFormat=0
MyCDONTSMail2.MailFormat=0
MyCDONTSMail2.Body=HTML
MyCDONTSMail2.Send
set MyCDONTSMail2=nothing
%>
HTH
SteveB
Replied 09 Nov 2006 12:37:16
09 Nov 2006 12:37:16 Dave Clarke replied:
cheers, steve <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk