Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDONTS email error

Status
Not open for further replies.

Sarky78

Programmer
Oct 19, 2000
878
GB
Hi there i have got the following code, to send out a simple email to people in a database. When i run this code all of the lines in the loop cause the following error 80040108 - according to technet this means that CdoE_INVALID_OBJECT - oh right thats cleared that up then !!!

I have sent an email just using a single email address, hard coded into the page and that is sent fine, when i do this it fails with the error above.

Set objEmail = Server.CreateObject("CDONTS.NewMail")

do while not objRS.EOF
If Not IsNull(objRs("email")) Then
objEmail.To=objRS("email")
objEmail.From = "ME2U"
objEmail.Subject = "Update!!"
objEmail.Body = MyBody
objEmail.Send
end if
objRS.Movenext
loop

anyone got any ideas why this is failing and a work around if needed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top