YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

convert cdonts to jmail Options
aussie
#1 Posted : Thursday, March 20, 2003 7:52:41 AM
Rank: Starting Member

Groups: Registered

Joined: 3/20/2003
Posts: 2
Location: ,
Was wondering if anyone could help me change some code. I have absolutely no idea about code. I purchased the eliteweaver paypal shield and need to get the mail function operating with Jmail rather than CDONTS. Basically my host doesn't support CDONTS and the script currently uses it for mailing with attachment. The script is great otherwise! The code checks some paramaters and attaches a file from the nominated directory and emails to the end user. Have copied it below. Any help or advice would be greatly appreciated ************** Dim objEmail Set objEmail = Server.CreateObject("CDONTS.NewMail") IF (Email_Format = "html") THEN objEmail.BodyFormat = 0 END IF objEmail.MailFormat = 0 objEmail.From = (Paypal_Email) objEmail.To = (Payer_Email) objEmail.Subject = (Subject_Line) IF (Send_Digital = "on") THEN objEmail.AttachFile(Digital_Item) END IF objEmail.Body = (EMAIL_Body) objEmail.Send Set objEmail = Nothing Message.Close Set Message = Nothing Set Body = Nothing END IF *************************
Sponsor  
 
daveCollins
#2 Posted : Thursday, April 17, 2003 5:05:36 PM
Rank: Starting Member

Groups: Registered

Joined: 4/17/2003
Posts: 3
Location: ,
Try substituting this code. This has not been tested. I just substituted JMAIL properties and methods for the CDONTS ones. JMAIL requires an SMTP server address.


Set objEmail = Server.CreateObject("JMail.SMTPMail")

IF (Email_Format = "html") THEN
objEmail.ContentType = "text/html"
END IF

objEmail.ServerAddress = "mail.your_domain_name.com:25" ' change this to your SMTP mail server
objEmail.Sender = (Paypal_Email)
objEmail.AddRecipient = (Payer_Email)
objEmail.Subject = (Subject_Line)

IF (Send_Digital = "on") THEN
objEmail.AddAttachment(Digital_Item)
END IF

objEmail.Body = (EMAIL_Body)
objEmail.Execute
Set objEmail = Nothing

Message.Close
Set Message = Nothing
Set Body = Nothing
END IF
daveCollins
#3 Posted : Thursday, April 17, 2003 5:25:30 PM
Rank: Starting Member

Groups: Registered

Joined: 4/17/2003
Posts: 3
Location: ,
You might also need to add this line somewhere before the objEmail.execute:

objEmail.Priority = 3

Set this to whatever you want the mail priority to be. 1 is the highest(urgent) and 5 is the lowest
aussie
#4 Posted : Friday, April 18, 2003 7:43:50 AM
Rank: Starting Member

Groups: Registered

Joined: 3/20/2003
Posts: 2
Location: ,
Thanks Dave,

appreciate your time to do this.

Aussie
dkursten
#5 Posted : Tuesday, April 22, 2003 4:27:30 PM
Rank: Starting Member

Groups: Registered

Joined: 4/22/2003
Posts: 19
Location: ,
Try this...

Substitute your own e-mail addresses and message...

var Mail;
var Subject;
var Body;

Subject = "Premium Account Enabled";

var Body = "<HTML>" +
"<HEAD></HEAD>" +
"<BODY>" +
"Dear " +
firstname +
",<br /> <br /><b>e-z-quote Premium Account Enabled</b>" +
"<br /> <br />Thank you for upgrading your account. Your Premium Account is now active on our system." +
"<br /> <br /><a href='http://www.e-z-quote.co.uk' target='_blank'>Please click here to Sign In and begin using your new features.</a>" +
"<br /> <br />If you need help with Creating Supplier Groups and Submitting RFQ#146;s, click on the HELP tab once you have Signed In." +
"</BODY>" +
"</HTML>";

// Create an instance of the NewMail Object
Mail = Server.CreateObject("CDONTS.NewMail");

// NOTE: If the "To" or "From" properties of CDONTS contain
// invalid email address you will not recieve the email.

Mail.From = "someone@somewhere.com";
Mail.To = "someone@somewhere.com"; //or a variable
Mail.Subject = Subject;
Mail.Body = Body;

// In order to send the email in HTML format we have to set
// both MailFormat and BodyFormat equal to zero

Mail.MailFormat = 0
Mail.BodyFormat = 0

Mail.Send();

Mail = null;

// End Send an email to customer

Dave
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.295 seconds.