0

We recently migrated from a local Exchange server to Office 365 and now I cannot get CF9 to make a connection using CFIMAP.

Here is the offending code:

    <cfimap 
      action ="OPEN"     
      connection = "Test" 
      password = "*****" 
      port = "993" 
      secure = "yes"  
      server = "outlook.office365.com" 
      stoponerror = "true" 
      timeout = "10" 
      username = "***@****.org">         

The CF error says "This exception was caused by: javax.mail.MessagingException: Connection refused: connect; nested exception is: java.net.ConnectException: Connection refused: connect."

Among the things I've tried is installing the Office 365 SSL certificate on the CF server, as described here in an extremely helpful answer that solved an earlier CFHTTP problem.

I greatly appreciate any help anyone who's been able to connect CF9 to Office 365 with CFIMAP can offer.

Community
  • 1
  • 1
Rocky
  • 321
  • 1
  • 8
  • Further testing reveals my problem is not related to Office 365, but possibly to the CF edition. The code runs fine on my laptop running CF 9 Developer edition, and I can access both Office 365 and Gmail using secure IMAP connections. But the same code fails on CF 9 Standard edition, where I get the "connection refused" error. – Rocky Mar 04 '15 at 15:42
  • Are you sure that you added the certificate to the correct Java keystore (the one that ColdFusion is using)? Did you restart the ColdFusion server after adding that certificate? Are you able to connect to the Office 365 site successfully (using a browser) from the machine that is not working? – Miguel-F Mar 04 '15 at 18:18

1 Answers1

0

Mystery solved: The firewall was blocking IMAP access from that server. Miguel, thanks for suggesting the wrong keystore issue, as I've run into that in the past.

Rocky
  • 321
  • 1
  • 8