Solved

CDO problem

Posted on 2012-03-27
3
453 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 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