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 objMail=Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.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"
.Update
End With
With objMail
.SUBJECT = "Help Form"
.SENDER = "
[email protected]"
.TO = "
[email protected]"
.HTMLBody = "Email body"
.Send
End With
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.
Dave