Setup EMails: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
mNo edit summary
Line 39: Line 39:
If like Yahoo, your Email provider has this restriction, you must set this setup to choose the other method "SMTP/SMTPS socket library" and enter here the SMTP server and credentials provided
If like Yahoo, your Email provider has this restriction, you must set this setup to choose the other method "SMTP/SMTPS socket library" and enter here the SMTP server and credentials provided
by your Email provider.
by your Email provider.
You can also use [Suped's Domain Health Checker](<nowiki>https://www.suped.com/tools/domain-health-checker</nowiki>) to verify your domain's SPF, DKIM and DMARC configuration.


==Hostname or ip address of SMTP/SMTPS sending server==
==Hostname or ip address of SMTP/SMTPS sending server==
Line 122: Line 124:
Enable the module OAuth2.
Enable the module OAuth2.
Into OAUTH2 module setup, create an OAuth2 entry for Google provider with the 3 scopes:
Into OAUTH2 module setup, create an OAuth2 entry for Google provider with the 3 scopes:
* gmail_full  (=https://mail.google.com/)  or https://www.googleapis.com/auth/gmail.readonly or https://www.googleapis.com/auth/gmail.modify)
 
*gmail_full  (=https://mail.google.com/)  or https://www.googleapis.com/auth/gmail.readonly or https://www.googleapis.com/auth/gmail.modify)
 
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.


Now, into the Home - Setup - Email must be
Now, into the Home - Setup - Email must be
*Email sending method: SMTPs
*Email sending method: SMTPs
*Server: smtp.gmail.com
*Server: smtp.gmail.com
Line 219: Line 224:
*Port: 587
*Port: 587
*Authentication method: Use a password (AUTH LOGIN)
*Authentication method: Use a password (AUTH LOGIN)
*User name: The main email account  
*User name: The main email account
*Password: Your password account (If you enabled the Double Authentication Method, you must create an "Application password" from menu https://account.microsoft.com/security/ -> "More security options" and use it as the password instead of your common password)
*Password: Your password account (If you enabled the Double Authentication Method, you must create an "Application password" from menu https://account.microsoft.com/security/ -> "More security options" and use it as the password instead of your common password)
*Use TLS (SSL) encrypt: no
*Use TLS (SSL) encrypt: no
Line 235: Line 240:
Response: 501 5.5.4 Invalid domain name [...]
Response: 501 5.5.4 Invalid domain name [...]


Error after sending EHLO xxxxxx:4435 : 501
Error after sending EHLO xxxxxx:4435<span> </span>: 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 2 (default on recent versions) so Dolibarr will use the domain defined into conf $dolibarr_main_url_root of you conf.php file as the HELO string. Use 1 to use the domain in the FROM email. With 0 (old versions), Dolibarr will use "smtp.office365.com" that may be refused.
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 2 (default on recent versions) so Dolibarr will use the domain defined into conf $dolibarr_main_url_root of you conf.php file as the HELO string. Use 1 to use the domain in the FROM email. With 0 (old versions), Dolibarr will use "smtp.office365.com" that may be refused.
Line 243: Line 248:
Enable the module OAuth2.
Enable the module OAuth2.
Into OAUTH2 module setup, create an OAuth2 entry for Microsoft provider with the 3 scopes:
Into OAUTH2 module setup, create an OAuth2 entry for Microsoft provider with the 3 scopes:
* offline_access
 
* outlook.office365.com/IMAP.AccessAsUser.All
*offline_access
* outlook.office365.com/SMTP.Send
*outlook.office365.com/IMAP.AccessAsUser.All
*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
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
*Email sending method: SMTPs
*Email sending method: SMTPs
*Server: smtp.office365.com (Microsoft Office 365, Exchange Server) and smtp-mail.outlook.com
*Server: smtp.office365.com (Microsoft Office 365, Exchange Server) and smtp-mail.outlook.com
*Port: 587
*Port: 587
*User name: The main email account  
*User name: The main email account
*Authentication method: OAUTH2
*Authentication method: OAUTH2
*OAUTH2 authentication service: Choose the entry created in OAUth2 setup
*OAUTH2 authentication service: Choose the entry created in OAUth2 setup
Line 347: Line 355:
[[File:warning.png]] Because using this smtps access need to store your login/pass into application, this access is classified by Yahoo as a "less secured access".
[[File:warning.png]] Because using this smtps access need to store your login/pass into application, this access is classified by Yahoo as a "less secured access".


You need to create a dedicated password for the application : on Yahoo go on "Personal Information"->"Account Security"->"Manage application passwords".
You need to create a dedicated password for the application<span> </span>: on Yahoo go on "Personal Information"->"Account Security"->"Manage application passwords".


In the list, select an application of your choice for Dolibarr, for exempel "Android Mail" then  click on "generate"
In the list, select an application of your choice for Dolibarr, for exempel "Android Mail" then  click on "generate"
Line 383: Line 391:


==Create an email template==
==Create an email template==
To create an email template, you have several fields to fill :
To create an email template, you have several fields to fill<span> </span>:


*Code of the template : Code is free to define
*Code of the template<span> </span>: Code is free to define
*Language : Language of the template
*Language<span> </span>: Language of the template
*Type of template : Email template can be dedicated to modules or visible globally
*Type of template<span> </span>: Email template can be dedicated to modules or visible globally
*Owner of the template
*Owner of the template
*Private : If set to private, only the owner will see the template
*Private<span> </span>: If set to private, only the owner will see the template
*Position : Position of the template on the list (1 being the top position)
*Position<span> </span>: Position of the template on the list (1 being the top position)
*Subject of the email : [[Variable substitution system]] can be used
*Subject of the email<span> </span>: [[Variable substitution system]] can be used
*Attach file : If the email is sent from a screen where a document is available, the document will be immediately added to mail if you enter "1".
*Attach file<span> </span>: If the email is sent from a screen where a document is available, the document will be immediately added to mail if you enter "1".
*Content of the email : [[Variable substitution system]] can be used
*Content of the email<span> </span>: [[Variable substitution system]] can be used


==Modify an existing email template==
==Modify an existing email template==
On the email template list, you can :
On the email template list, you can<span> </span>:


*See the resume of the template
*See the resume of the template
3

edits

Navigation menu