After spending all day figuring out a dozen different things, the site finds itself unable to send emails. So I constructed a simple email sender to test it out.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">That's literally the whole thing. it gives...
<html>
<head>
<title> Email Test </title>
</head>
<body>
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="doNotReply@myserver.com"
myMail.To="myemail@gmail.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>
The message has been sent.
</body>
</html>
CDO.Message.1 error '80040220'So I googled. First I changed the app pool user from ApplicationPoolIdentity to NetworkService, as many bloggers suggest.
The "SendUsing" configuration value is invalid.
/cgi-bin/testemail.asp, line 14
No change.
Then I found some code that looks like this:
schema = "http://schemas.microsoft.com/cdo/configuration/"and... no such luck. Same Error.
Set objFlds = objConf.Fields
with objFlds
.Item(schema & "sendusing") = 2
.Item(schema & "smtpserver") = "smtp.gmail.com"
.Item(schema & "smtpserverport") = 465
.Item(schema & "smtpauthenticate") = 1
.Item(schema & "sendusername") = "abc@def.com"
.Item(schema & "sendpassword") = "qwerty"
.Item(schema & "smtpusessl") = 1
.Update
End with
...
Bryan Valencia is a contributing editor and founder of Visual Studio Journey. He owns and operates Software Services, a web design and hosting company in Manteca, California.
1 comment:
Did you ever find a resolution to this problem? I'm having the exact same issue.
Post a Comment