I'm having an issue where my comapany are migrating our exchange to a new CAS server.
We have several pages on our website using classic asp that sends email using CDOSYS which are working fine with the current exchange server.
When I swap over to the new CAS server I get a weird thing happening. The emails are sent instantly as they should but the script itself takes just over 30 seconds to complete. No errors or anything there's just a very long delay.
This is my code I use for testing this.
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "A test email"
myMail.From = "A valid email address"
myMail.To = "A valid email address"
myMail.TextBody = "This is a test email."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "1.2.3.4"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myMail.Configuration.Fields.Update
myMail.Send
set myMail = Nothing
I can't work out why this is, is it something with the code or something with the new exchange server.
I've played around with smtpconnectiontimeout but makes no difference.
objCDO.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 5
The web server is running Windows 2008 with IIS7.
Anyone experienced something similar?
Yep - just installed the SMTP service on the IIS box and bounced the email off that instead. Couldn't find a way past it and got the code updated long term.