I am trying to do a form to email from my website hosted in a Windows Server 2003 Standard Edition.
The form when submitted should go to
[email protected]. But it gives me the following error message.
error '8004020f'
with the line number
Suppose i change the email address from
[email protected] to any other address outside mydomain i.e. yahoo.com or hotmail.com it works fine.
Please help me.
Thank You
Naveen
Below is my code,
if mailComp = "CDOSYS" then
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
cdoMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0
cdoMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
cdoMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
cdoMessage.Configuration.Fields.Update
cdoMessage.From = Request.Form("EMAIL")
cdoMessage.To = "
[email protected]"
cdoMessage.Subject = subject
cdoMessage.HtmlBody = body
cdoMessage.Send
if Err.Number <> 0 then
SendMail = "Email send failed: " & Err.Description & "."
end if
set cdoMessage = Nothing
exit function
end if