CDO.Message error- SendUsing config value
I am trying to write an email form using cdosys, but I am getting the following error
-The "SendUsing" configuration value is invalid
It seems like everybody in the world is having this problem. I've looked through a ton of post and tried everything. Following is my code:
set cdoConfig = Server.CreateObject("CDO.Configuration")
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mysmtp.server.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.SUBJECT = "Help Form"
.SENDER = "email@example.com"
.TO = "firstname.lastname@example.org"
.HTMLBody = "Email body"
set objMail = Nothing
set cdoConfig = Nothing
Unless I am missing something obvious, I think it has something to do with smtp authentication. Any help would be greatly appreciated.