Line 225:
Line 225:
Note: Outlook and Office365 are the worst platforms we know to manage emails. It is not compliant with most web and emails standard so the setup is often difficult with this platform. Documentation about SMTP credential is also poor. It depends on a lot of parameters saved into your Outlook platform. Ask the parameters to use the SMTP server of your Outlook/Office365 platform to your Outlook/Office365 provider. Only your Outlook/Office365 provider is able to give you those parameters. If you can't contact him, I'm afraid, trying any combination of parameters is the only solution to find the good one with this email platform but the one suggested in this wiki should works in 90% of the cases (note that some other parameters specific to Office365 may also be expected by the platform, ask your Microsoft integrator).
Note: Outlook and Office365 are the worst platforms we know to manage emails. It is not compliant with most web and emails standard so the setup is often difficult with this platform. Documentation about SMTP credential is also poor. It depends on a lot of parameters saved into your Outlook platform. Ask the parameters to use the SMTP server of your Outlook/Office365 platform to your Outlook/Office365 provider. Only your Outlook/Office365 provider is able to give you those parameters. If you can't contact him, I'm afraid, trying any combination of parameters is the only solution to find the good one with this email platform but the one suggested in this wiki should works in 90% of the cases (note that some other parameters specific to Office365 may also be expected by the platform, ask your Microsoft integrator).
−
This is a more complete thread about this setup reported by a French user: https://www.dolibarr.fr/forum/t/envoi-de-mail-depuis-un-smtp-office365/29299/15?u=eldy
+
This is a more complete thread about this setup reported by a French user: https://www.dolibarr.fr/forum/t/configuration-office-365-mail-smtp/37320/12
[[File:warning.png]] If you got error:
[[File:warning.png]] If you got error:
Line 233:
Line 233:
Error after sending EHLO xxxxxx:4435 : 501
Error after sending EHLO xxxxxx:4435 : 501
−
the problem is not into your authentication because error is before that, at very begin of protocol. Try to go on Home - Setup - Other and add MAIL_SMTP_USE_FROM_FOR_HELO to value 1 so Dolibarr will use the domain in the from email as the HELO string, or 0 so Dolibarr will use "smtp.office365.com"
+
the problem is not into your authentication because error is before that, at very begin of protocol. Try to go on Home - Setup - Other and add MAIL_SMTP_USE_FROM_FOR_HELO to value 1 so Dolibarr will use the domain in the from email as the HELO string. With 0, Dolibarr will use "smtp.office365.com" that may be refused.
===Outlook / Office365 / Exchange server (with OAuth2)===
===Outlook / Office365 / Exchange server (with OAuth2)===
Line 243:
Line 243:
* outlook.office365.com/SMTP.Send
* outlook.office365.com/SMTP.Send
Go on the Tab Token Management to generate a token for this OAUth2 service.
Go on the Tab Token Management to generate a token for this OAUth2 service.
+
A full example on setup process is available in french here: https://weedoo.digital/knowledgebase/2/Configurer-Dolibarr-avec-Microsoft365-et-OAuth2.html
Now, into the Home - Setup - Email must be
Now, into the Home - Setup - Email must be
Line 263:
Line 264:
*Server: yourdomainname.mail.protection.outlook.com
*Server: yourdomainname.mail.protection.outlook.com
*Port: 25
*Port: 25
−
*Authentication method: Use a password (AUTH LOGIN)
+
*Authentication method: Use a password (AUTH LOGIN) or No authentication.
*User name: Keep empty
*User name: Keep empty
*Password: Keep empty
*Password: Keep empty