Dude, I pasted the old CDONT along with the CDOSYS format for you to compare the difference. The "your.home.org" should be changed to your own mail setting. It works great on mine, hopefully yours too.
=========
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Out going SMTP server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "your.home.org"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields.Update
'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = "
[email protected]"
objCDOSYSMail.To = "
[email protected]"
objCDOSYSMail.BCC = "
[email protected]"
objCDOSYSMail.Subject = "Subject goes here"
objCDOSYSMail.HTMLBody = "html enhanced email message goes here"
objCDOSYSMail.Send
'Close the server mail object
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
'commented out: below is CDONTS object.
'Set objNewMail = CreateObject("CDONTS.NewMail")
'objNewMail.From = "
[email protected]"
' objNewMail.To = "
[email protected]"
'objNewMail.Bcc = "
[email protected]"
'objNewMail.Cc = "
[email protected]"
'objNewMail.BodyFormat=0
'objNewMail.MailFormat=0
'objNewMail.Subject = "Subject goes here"
'objNewMail.Body= "Body
'objNewMail.Send
'set objNewMail=nothing
%>
Quote:
quote:Originally posted by Tee88
I am trying to send email using CDOSYS.#29259;Right now I use CDONTS and because we are going to a different platform I have to change all of my forms to send using CDOSYS.#29259;Specifically I need to know how to pull form variables.#29259;If someone could PLEASE post an example using CDOSYS, I would greatly appreciate it.#29259;
Thanks,
Tee
|