Jump to content

Working with Office365 SMTP Email


Recommended Posts

I am trying to setup my new PrestaShop store with my existing Office365 webmail. I have set the expected values given to me by Office 365:

SMTP setting

Server name: smtp.office365.com

Port: 587

Encryption method: TLS

 

in the Advanced Parameters -> E-mail screen and running a test gives the following error:

 

The SMTP connection failed to start [tls://smtp.office365.com:587]: fsockopen returned Error Number 0 and Error String ''

 

I also tried some other settings based while trying some things out:

 

The SMTP connection failed to start [tls://pod51044.outlook.com:587]: fsockopen returned Error Number 0 and Error String ''

 

The SMTP connection failed to start [ssl://pod51044.outlook.com:587]: fsockopen returned Error Number 0 and Error String ''

 

Has anyone else been able to get PrestaShop working with Office 365? Do I need to use a different mail system (PHPMailer or something)? Where would I start with customizing that in the code?

 

Any advice anyone can give would be greatly helpful!

Link to comment
Share on other sites

Yep, same issue here. Tested proven working cridentials with outlook.com email, and with gmail (which works on my forum) and both return this message.

 

The SMTP connection failed to start [tls://smtp.gmail.com:587]: fsockopen returned Error Number 0 and Error String ''

or for outlook.com:

The SMTP connection failed to start [tls://smtp.live.com:587]: fsockopen returned Error Number 0 and Error String ''

 

I firmly believe this is a prestashop bug since both of these settings work for me when i test them on other platforms.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Prestashop rejected the change, and then rejected my submission as well.

http://forge.prestashop.com/browse/PSCFV-10182

 

They do not see the issue with using 7 year old software that does not support STARTTLS.  They also fail to provide valid jusitifcation.  You are on your own...

 

If you must use your own SMTP server that requires STARTTLS, then you can use my patch I created for this.

http://www.prestashop.com/forums/topic/270220-modification-swift-mailer-upgrade-better-support-for-ssltls/

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

I am getting this error :

 

on version 1.5.6.2 latest stable as of 7th march 2014

 

WORKS WITH GMAIL THOUGH....

 

why would it work with gmail and not work office365 (exchange online)??

 

The SMTP connection failed to start tls : / / smtp.office365.com:25 fsockopen returned Error Number 110 and Error String 'Connection timed out'

Edited by ricky11 (see edit history)
Link to comment
Share on other sites

there are 2 issues I see

 

First, you are trying to connect to office365 using port 25, which is probably blocked by your hosting provider.  I would try using port 587.

 

Second, I believe after changing your port to 587, you are then going to encounter a different error.  The next error will likely be ...

fsockopen returned Error Number 0 and Error String
Edited by bellini13 (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

For others ending up on this thread: I did buy Bellini's patch and the system finally send email though my Outlook 365 address. 

 

After a lot of research, I don't think there's an easier solution. The patch works great and is easy to install.

Edited by anncrow (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Hello,

 

If you use this patch and can send mail via office365 smtp. Can the mails be retrieved in the "sent items" of the account used for authentification ?

 

Because i use swiftmailer and can send mail via smtp.office365.com but i can't found the mails in my office365.

 

If i use a gmail account, i can found them in "sent items".

 

Thx.

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Hi all,

 

I have the same problem, get this error after trying to change the smpt entries of my office365 exchange accout:

 

smtp: smtp.office365.com, TLS, Port 587

 

Fehler: Bitte prüfen Sie Ihre Einstellungen

 

Does anyone has a solution for working with smtp mail of office 365?

Link to comment
Share on other sites

Hi all,

 

I have the same problem, get this error after trying to change the smpt entries of my office365 exchange accout:

 

smtp: smtp.office365.com, TLS, Port 587

 

Fehler: Bitte prüfen Sie Ihre Einstellungen

 

Does anyone has a solution for working with smtp mail of office 365?

what version of Prestashop are you using?

Link to comment
Share on other sites

  • 2 years later...

Hi, 

I have the same problem with Office 365

Expected response code 250 but got code "554", with message "554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:02016F81

Link to comment
Share on other sites

  • 11 months later...
  • 2 years later...

Sorry for digging up an old topic, but I have the same problem now....

I have just recently switched to Microsoft 365 Business email and cannot get the email working either.

Have tried on a live site running ps1.6.1.24 and my test site running ps8.1.2 using the attached setting.

Have contacted Microsoft support and they tell me it's not an error on their end.

Did anyone find a solution to this problem??

Screen Shot 2023-10-17 at 14.06.57 pm.png

Edited by BeatsMe (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...