Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: pjmarsh on January 03, 2013, 04:07:36 AM

Title: Office 365 for mail
Post by: pjmarsh on January 03, 2013, 04:07:36 AM
Hi

I'm trying to set SMF up to use Office 365 to send its mail, but am unable to find anything to help me do this.  My understanding is I need to connect with TLS.

Is it possible?  Anyone got any advice on how to do it?

Thanks

Phil
Title: Re: Office 365 for mail
Post by: Colin on January 03, 2013, 04:11:09 AM
So you are trying to configure SMF to send through your Office 365 hosted email account using SMTP, right?
Title: Re: Office 365 for mail
Post by: pjmarsh on January 03, 2013, 04:28:36 AM
Hi Colin

That's correct.

Thanks

Phil
Title: Re: Office 365 for mail
Post by: Colin on January 03, 2013, 04:34:17 AM
Does putting tls:// as a prefix to the server work for you?
Title: Re: Office 365 for mail
Post by: pjmarsh on January 03, 2013, 05:03:54 AM
Where about would I find that in 2.0.2?  I've seen it referenced in earlier versions but can't seem to find it on mine.
Title: Re: Office 365 for mail
Post by: Colin on January 03, 2013, 05:05:09 AM
Admin->Maintenance->Mail->Settings
Title: Re: Office 365 for mail
Post by: pjmarsh on January 03, 2013, 05:31:23 AM
Thanks Colin, I'm making progress.  I'm now getting this in the error log
Could not connect to SMTP host: 10 : Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP?

Do you know what needs changing in the php.ini?

Thanks

Phil
Title: Re: Office 365 for mail
Post by: Colin on January 03, 2013, 05:37:58 AM
Are you sure you need TLS? Humor me and try it without it once.
Title: Re: Office 365 for mail
Post by: pjmarsh on January 03, 2013, 06:22:07 AM
I've tried without the tls:// and get the following 2 errors:

2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to pod51010.outlook.com:587 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
)

Could not connect to SMTP host: 10060 : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I've also tried this with the port being 25 and get the same error.

I'm only thinking it needs TLS because of this (http://support.microsoft.com/kb/2600912) and this (http://www.configureoffice365.com/smtp-configuration-office-365/).

Thanks

Phil
Title: Re: Office 365 for mail
Post by: Storman™ on January 03, 2013, 06:40:42 AM
I understand that Office 365 does require TLS encryption running through port 587.

Whether it will work depends very much on your hosting, what set-up are you on (shared account, VPS ?).
Title: Re: Office 365 for mail
Post by: pjmarsh on January 03, 2013, 09:59:29 AM
Hi Storman

It's hosted on one of our Windows VMs at the moment which we have full control over, though in the first instance I'm testing it on a local copy on my Windows 7 PC.

Thanks

Phil
Title: Re: Office 365 for mail
Post by: pjmarsh on January 07, 2013, 04:42:51 AM
As I say, we should be able to set anything we need to in windows or php.  Can anyone tell us what we need to set?

Thanks

Phil
Title: Re: Office 365 for mail
Post by: Colin on January 08, 2013, 08:01:46 PM
Hmm you should be able to open 587, but I don't recall if SMF allows you to define an SMTP port. Storman did you have something in mind?
Title: Re: Office 365 for mail
Post by: pjmarsh on March 18, 2013, 06:53:39 AM
You can specify the smtp port, but it's still not working.  The error log shows this:
2: fsockopen(): unable to connect to tls://pod51013.outlook.com:587 (Unknown error)
File: D:/wwwroot/SimpleMachines/Sources/Subs-Post.php
Line: 1332


Thanks

Phil
Title: Re: Office 365 for mail
Post by: kat on March 30, 2013, 05:16:59 PM
Any progress, with this?