Forums

ASP

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>
&lt;%

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"
%&gt;
</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.....

&lt;%
Dim MyCDONTSMail2
Dim HTML
Set MyCDONTSMail2 = CreateObject("CDONTS.NewMail"

HTML = "&lt;!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN""&gt;"
HTML = HTML & "&lt;html&gt;"
HTML = HTML & "&lt;head&gt;"
HTML = HTML & "&lt;title&gt;Sending CDONTS Email Using HTML&lt;/title&gt;"
HTML = HTML & "&lt;/head&gt;"
HTML = HTML & "&lt;body bgcolor=""FFFFFF""&gt;"
HTML = HTML & "&lt;p&gt;&lt;font size =""3"" face=""Arial""&gt;&lt;strong&gt;"
HTML = HTML & "Name Of Store&lt;/strong&gt;&lt;br&gt;"
HTML = HTML & "Incoming Customer Order&lt;/strong&gt;&lt;/p&gt;"
HTML = HTML & "&lt;p align = ""center""&gt;Bla Bla Bla Bla Bla&lt;/p&gt;"
HTML = HTML & "&lt;/body&gt;"
HTML = HTML & "&lt;/html&gt;"

MyCDONTSMail2.From= " "
MyCDONTSMail2.To=" "
MyCDONTSMail2.Subject="Incoming Customer Order"
MyCDONTSMail2.BodyFormat=0
MyCDONTSMail2.MailFormat=0
MyCDONTSMail2.Body=HTML
MyCDONTSMail2.Send
set MyCDONTSMail2=nothing
%&gt;

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

Reply to this topic