News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Office 365 for mail

Started by pjmarsh, January 03, 2013, 04:07:36 AM

Previous topic - Next topic

pjmarsh

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

Colin

So you are trying to configure SMF to send through your Office 365 hosted email account using SMTP, right?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

pjmarsh

Hi Colin

That's correct.

Thanks

Phil

Colin

Does putting tls:// as a prefix to the server work for you?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

pjmarsh

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.

Colin

Admin->Maintenance->Mail->Settings
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

pjmarsh

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

Colin

Are you sure you need TLS? Humor me and try it without it once.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

pjmarsh

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 [nofollow] and this [nofollow].

Thanks

Phil

Storman™

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 ?).

pjmarsh

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

pjmarsh

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

Colin

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?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

pjmarsh

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

kat


Advertisement: