arielbf
asked on
CDO problem
I was using the following script to send emails:.
Set objCDOSYSMail = Server.CreateObject("CDO.M essage")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.mywebsite.com"
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("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "me@mywebsite.com"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "myPassword"
objCDOSYSCon.Fields.Update
Set objCDOSYSMail.Configuratio n = objCDOSYSCon
objCDOSYSMail.BodyPart.Cha rset = "UTF-8"
objCDOSYSMail.From = "me@mywebsite.com"
objCDOSYSMail.To = rs("email")
objCDOSYSMail.Subject = letterSubject
objCDOSYSMail.HTMLBody = letterbody
objCDOSYSMail.Send
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
The Script worked well for some months, but now it is not sending emails at all.
I tried to send email from the same account through webmail and it went OK.
Any Ideas?
Set objCDOSYSMail = Server.CreateObject("CDO.M
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.mywebsite.com"
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("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "me@mywebsite.com"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "myPassword"
objCDOSYSCon.Fields.Update
Set objCDOSYSMail.Configuratio
objCDOSYSMail.BodyPart.Cha
objCDOSYSMail.From = "me@mywebsite.com"
objCDOSYSMail.To = rs("email")
objCDOSYSMail.Subject = letterSubject
objCDOSYSMail.HTMLBody = letterbody
objCDOSYSMail.Send
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
The Script worked well for some months, but now it is not sending emails at all.
I tried to send email from the same account through webmail and it went OK.
Any Ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I still don't really understand the mechanism of the error )-:
But the solution worked for me now and may work for you (-:
But the solution worked for me now and may work for you (-:
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objCDOSYSCon.Configuration
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Your UserID on the SMTP server
objCDOSYSCon.Configuration
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "youruserid"
'Your password on the SMTP server
objCDOSYSCon.Configuration
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpassword"