CDOSYS mail problem

I am trying to use CDOSYS to send an email on a site.
The thing is, it seemed to work reasonably well a few weeks ago, but no longer does, and I don't think I changed anything relevant.
I've taken out the form inforation that I was using and am setting my fields in the page for testing purposes.
Now the error number I get is this: 80040211 (that's all I get in the log, sorry if its vague) on line 85 which is this line :  objCDOSYSMail.Send

So I can't figure why it worked a few weeks ago when I was testing and now doesn't.
My server host said they didn't change anything.
If anyone can see anything wrong, please let me know.

' email values to set in form
Dim  SendersName
Dim  SendersEmail
Dim  EmailSubject
Dim  EmailRecipient
Dim  thanksPage

Dim  objCommand
Dim  rsrecipient
Dim  Emailtext
Dim  objNewMail

' create email
Dim objCDOSYSCon
Dim objCDOSYSMail

Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

'Outgoing SMTP server
objCDOSYSCon.Fields ("") = "*******.com"
objCDOSYSCon.Fields ("") = 25
objCDOSYSCon.Fields ("") = 2
objCDOSYSCon.Fields ("") = 30
objCDOSYSCon.Fields("") = 1
objCDOSYSCon.Fields("")  = "*****"

      ' The username for authenticating to an SMTP server
objCDOSYSCon.Fields("") = "****@****.com"
      ' The password used to authenticate to an SMTP server
objCDOSYSCon.Fields("") = "*****"

'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon

Sendersname = "Jeff Hahn"
SendersEmail = "jhahn@f*******.com"
EmailRecipient = "jhahn@f******.com"

objCDOSYSMail.From = sendersname
objCDOSYSMail.To = emailrecipient
objCDOSYSMail.Subject = "test" 'emailsubject
objCDOSYSMail.HTMLBody = "test2" ' request.form("message")
'on error resume next

Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing

' send email
Set objNewMail = Nothing

' show thankyou page
if not request("thanksPage")="" then
      response.write("<html><body>Message" & emailrecipient & " dd</body></html>")
end if


Who is Participating?
PAQed with points refunded (300)

Community Support Moderator
Try changing
objCDOSYSCon.Fields ("") = 2

objCDOSYSCon.Fields ("") = 1

Alternate is comment these lines
objCDOSYSCon.Fields ("") = "*******.com"
objCDOSYSCon.Fields ("") = 25
objCDOSYSCon.Fields ("") = 2
objCDOSYSCon.Fields ("") = 30
objCDOSYSCon.Fields("") = 1
objCDOSYSCon.Fields("")  = "*****"

ie the optional parameter setting.. it should ideally work.

One more reason could be replace chr(13) with vbcrlf

Also go through
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

jhahn72Author Commented:
Well, when I set the ...sendusing") = 1, it works, but I'd like to have it work without the use of the local smtp server.
jhahn72Author Commented:
Well, what I found was more of a dumb error on my part I think.

The error code that I was getting 80040211, really was telling me that something was wrong with my account. When I had it working last time the mail account that I was using was different.
When I changed things, I had set up a mail account on the server to be sort of generic, but I didn't set up the mailbox. When I changed the account settings to have a mailbox it worked.
When I had an incorrect password or username "" it didn't work. When those things were corrected, it did work.

Ok, well, I guess that's it. Thanks for the suggestions.
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ - Refund

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.