After upgraded the webserver os to Win2K3 and upgrading the IIs to IIS6, our webserver is no longer sending emails to the exchange server. The email dyes on the webserver and is placed in Bad Mail on the webserver.
Verifed there are no problems with SMTP and our DNS. Any ideas?
Here is the odd issue. If we login to the web server and use the command prompt to generate an email, it is sent to the exchange server with no problems. If we try and generate the email using the ASP script below, using CDOSYS, the mail goes directly to bad mail, and never leaves the mail server.
Any clues to how to resolve this issue will be greatly appreciated.
Here is a copy of the script being used.
Code:
<%
Dim iConf
Dim Flds
Dim objMessage
If Request.Form("btnSend").Count > 0 Then
Set objMessage = CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
iConf.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") _
= 2 'Send the message using the network (SMTP over the network).
iConf.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="67.110.5.35"
iConf.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
= 25
iConf.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") _
= False 'Use SSL for the connection (True or False)
iConf.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") _
= 60
iConf.Fields.Update
Set objMessage.Configuration = iConf
objMessage.Subject = Request.Form("subject")
objMessage.Sender = Request.Form("From")
objMessage.To = Request.Form("To")
objMessage.TextBody = Request.Form("message")
objMessage.Send
Set iConf = Nothing
Set Flds = Nothing
Set objMessage = Nothing
End If
%>
BTW - the way my email process currently works is we have a form the user fills out. Then they click submit. At that point the ASP Mailer page is called and the values from the form are passed to it. The webserver then generates the email, and the user is then correctly redirected to another page telling them the email was succefully sent. Unforturnatly, the emai is not being sent. Instead it is going directly to the bad mail folder on the webserver.