Skip to main content
April 14, 2010
Question

Cannot connect to Microsoft Online Hosted Exchange with CFMAIL

  • April 14, 2010
  • 1 reply
  • 2167 views

Hi

I work with a non-profit in northern California that facilitates high-tech internships for teachers.

While their site host is Hostmysite.com - they recently moved their email services to Microsoft Online's hosted Exchange services.  As such, I need to update their code to send email notifications off of their new exchange servers so email dont appear as spoofs.  '

Microsoft provides the following settings:

http://blogs.technet.com/msonline/archive/2009/09/02/using-smtp-relay-with-exchange-online.aspx

I've set my cfmail tag as such - however, regardless if I use useTLS, useSSL or both, the emails are not sent.  A quick review of the CF mail log file reveals:

"Error","scheduler-1","04/14/10","14:47:00",,"Could not connect to SMTP host: smtp.mail.microsoftonline.com, port: 587"

<cfmail server="smtp.mail.microsoftonline.com"

username="web@***.org"

password="********"

useTLS="true"

port="587"

subject="Hello World"

to="****@yahoo.com"

from="web@***.org">

This is my test email - did it work?

</cfmail>

Any ideas?  Your help is appreciated!

Ben

<cfmail server="smtp.mail.microsoftonline.com" username="web@****.org" password="********" useTLS="true" port="587" subject="Hello World" to="****@yahoo.com" from="web@****.org"> This is my test email - did it work?   </cfmail>

This topic has been closed for replies.

1 reply

Inspiring
April 15, 2010

Can you telnet onto it from the server running CF?

--

Adam

Owainnorth
Inspiring
April 16, 2010

As Adam's getting at, that sounds a lot like your firewall is blocking you - seeing as it's on a weird port I wouldn't be surprised.

Open a command prompt and type the following:

telnet smtp.mail.microsoftonline.com 587

From here, I get this header, which means I've connected:

220 smtp.mail.microsoftonline.com Microsoft ESMTP MAIL Service ready at Fri, 16
Apr 2010 00:24:09 -0700

If the prompt just hangs instead, it's a networking or firewall issue.

O.

April 16, 2010

got it.  i tried your telnet and received the following error:

Connecting To smtp.mail.microsoftonline.com...Could not open connection to the host, on port 587: Connect failed

What would this mean?

Thanks again for your help!

Ben