Solved

CDO problem

Posted on 2012-03-27
3
451 Views
Last Modified: 2012-04-03
I was using the following script to send emails:.

Set objCDOSYSMail = Server.CreateObject("CDO.Message")
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.Configuration = objCDOSYSCon
objCDOSYSMail.BodyPart.Charset = "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?
0
Comment
Question by:arielbf
  • 2
3 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 37770269
If you are on a shared hosting service, they are probably blocking you or are are now requiring authentication.    If adding authentication does not work, then I would contact your hosting provider and ask about their TOS in regards to sending out mass email.

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objCDOSYSCon.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

'Your UserID on the SMTP server
objCDOSYSCon.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "youruserid"

'Your password on the SMTP server
objCDOSYSCon.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpassword"
0
 

Accepted Solution

by:
arielbf earned 0 total points
ID: 37770367
Well I had other page with the same script
However this time the script gave me an error:

Server object error 'ASP 0177 : 80070008'

Server.CreateObject Failed

I've searched a little and did a restart of the server and all is now working well.
0
 

Author Closing Comment

by:arielbf
ID: 37800006
I still don't really understand the mechanism of the error )-:
But the solution worked for me now and may work for you (-:
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question