snakehips2000
Programmer
I have a basic online email submission form on my site which has been working without problem for over a year. Now, it suddenly doesn't work. In an attempt to locate the problem, I've tried including a Response.Write line in my code to ensure the form values for the To, From, Subject and TextBody values are being accurately passed from my form and they are. The page returns the Response.Write values but fails at the ".Send" stage with "error '80040211'".
I'm at a loss as to what's changed? Have Microsoft changed the CD Configuration URLS which might now be making my code useless? Any help appreciated.
Here's the ASP code snippet:
<%
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2 'Must use this to use Delivery Notification
Const cdoAnonymous = 0
Const cdoBasic = 1 ' clear text
Const cdoNTLM = 2 'NTLM
'Delivery Status Notifications
Const cdoDSNDefault = 0 'None
Const cdoDSNNever = 1 'None
Const cdoDSNFailure = 2 'Failure
Const cdoDSNSuccess = 4 'Success
Const cdoDSNDelay = 8 'Delay
Const cdoDSNSuccessFailOrDelay = 14 'Success, failure or delay
Set objMessage = Server.CreateObject("CDO.Message")
set objConf = CreateObject("CDO.Configuration")
Set objFlds = objConf.Fields
With objFlds
.Item(" = cdoSendUsingPort
.Item(" = "[My SMTP Server]"
.Item(" = cdoBasic
.Item(" = "[my user name]"
.Item(" = "[my webmail password]"
.Update
End With
dim strEmail, strMsg, mainMsg
strEmail=Request.Form("SenderEmail")
strMsg=Request.Form("Msg")
With objMessage
Set .Configuration = objConf
.To = "[Recipient's email address]"
.From = strEmail
.Subject = "Any Subject"
.TextBody = strMsg
mainMsg=objMessage.To & " " & objMessage.From & " " & objMessage.Subject & " " & objMessage.TextBody
Response.write(mainMsg)
.Send
End With
Set objMessage = Nothing
Set objFields=Nothing
Set objConf=Nothing
%>
I'm at a loss as to what's changed? Have Microsoft changed the CD Configuration URLS which might now be making my code useless? Any help appreciated.
Here's the ASP code snippet:
<%
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2 'Must use this to use Delivery Notification
Const cdoAnonymous = 0
Const cdoBasic = 1 ' clear text
Const cdoNTLM = 2 'NTLM
'Delivery Status Notifications
Const cdoDSNDefault = 0 'None
Const cdoDSNNever = 1 'None
Const cdoDSNFailure = 2 'Failure
Const cdoDSNSuccess = 4 'Success
Const cdoDSNDelay = 8 'Delay
Const cdoDSNSuccessFailOrDelay = 14 'Success, failure or delay
Set objMessage = Server.CreateObject("CDO.Message")
set objConf = CreateObject("CDO.Configuration")
Set objFlds = objConf.Fields
With objFlds
.Item(" = cdoSendUsingPort
.Item(" = "[My SMTP Server]"
.Item(" = cdoBasic
.Item(" = "[my user name]"
.Item(" = "[my webmail password]"
.Update
End With
dim strEmail, strMsg, mainMsg
strEmail=Request.Form("SenderEmail")
strMsg=Request.Form("Msg")
With objMessage
Set .Configuration = objConf
.To = "[Recipient's email address]"
.From = strEmail
.Subject = "Any Subject"
.TextBody = strMsg
mainMsg=objMessage.To & " " & objMessage.From & " " & objMessage.Subject & " " & objMessage.TextBody
Response.write(mainMsg)
.Send
End With
Set objMessage = Nothing
Set objFields=Nothing
Set objConf=Nothing
%>