Solved

CDO problem

Posted on 2012-03-27
3
457 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

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 informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…

739 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