does anyone here have any experience of classic ASP and CDOSYS email?
i posted this over on stackoverflow, but so far not having any luck
I have a Windows Server 2003 R2 running IIS and a website using classic ASP. Trying to get it to use CDOSYS to email using our own (externally) hosted office365 exchange server.
I get the following error
CDO.Message.1 error '80040213'
The transport failed to connect to the server.
Which usually means one of 3 problems: 1. Incorrect SMTP server / port 2. Incorrect login/password 3. FROM address not valid according to SMTP server (wrong domain)
The SMTP server and port are correct according to supplier. The login/password is correct as I can log into the mail account using those details The FROM address is correct as that is the account I am using to log in.
I can telnet to the exchange server from the web server on that address and port, so a connection can be made from the server at least.
So at the moment I'm at a loss as to what the problem might be. Does anyone have any pointers as to anything else I need to look at?
This is the config the website is using
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.office365.com"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=587
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 20
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
things already tried:
port 25 - same error
"Did you setup an SMTP relay in Office 365?" - yes and same error.