Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034991Openbravo ERPA. Platformpublic2017-01-18 11:222022-04-29 14:19
JONHM 
Triage Platform Base 
normalminoralways
acknowledgedopen 
5
 
 
Core
No
0034991: Mails are not sent when using gmail's SMTP configuration without letting insecure apps to access the account
If using gmail's SMTP configuration to send emails through Openbravo, when trying to send emails it shows error 534 5.7.14, that means it cannot connect to the server.
It is necessary to allow less secure applications to access the account in order to send emails successfully.
1) As F&B Admin role, go to [Client] window and change the Email configuration of "F&B International Group":
 - Smtp server: smtp.gmail.com
 - SMPT Authentification: yes
 - Smtp server account: youraccount@gmail.com (You can use also youraccount@openbravo.com)
 - Smtp server password: yourpassword
 - Smtp server sender address: the same account as before
 - Smtp connection security: try both: SSL, port 465 or STARTTLS, port 587

2) Switch to [Purchase Invoice], clear the filters and open one completed record. Then, press the email button in the toolbar:
 - To: youraccount2@gmail.com (some other account to send the mail)
 - Reply-to: youraccount@gmail.com (same as defined in Client email configuration)
 - Subject & Message body: filled
Press "Send" button. An error message appears:

ERROR:
Problems while sending the email: 534-5.7.14 Please log in via your web browser and 534-5.7.14 then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 [^] d29sm3697125wmi.19 - gsmtp

2.1) However, if you let insecure apps to access your account, it works fine:
Using your mail account, go to this URL:

https://www.google.com/settings/u/0/security/lesssecureapps [^]
And turn on the Access for less secure apps.

Then repeat the same process described on (2) and now the email is successfully sent.
No tags attached.
related to defect 0031937 scheduled Triage Platform Base email configuration with gmail: it is necessary to enable the access without security in gmail configuration 
png Screenshot from 2017-01-18 11-05-48.png (169,041) 2017-01-18 11:22
https://issues.openbravo.com/file_download.php?file_id=10322&type=bug
png
Issue History
2017-01-18 11:22JONHMNew Issue
2017-01-18 11:22JONHMAssigned To => platform
2017-01-18 11:22JONHMFile Added: Screenshot from 2017-01-18 11-05-48.png
2017-01-18 11:22JONHMModules => Core
2017-01-18 11:22JONHMTriggers an Emergency Pack => No
2017-01-18 11:36caristuNote Added: 0093684
2017-01-20 09:13alostaleNote Added: 0093753
2017-01-20 09:13alostaleStatusnew => acknowledged
2017-01-20 09:13alostaleTypedefect => design defect
2022-02-01 08:09alostaleAssigned Toplatform => Triage Platform Base
2022-04-28 11:59shuehnerRelationship addedrelated to 0031937
2022-04-29 14:19ivancaceresIssue Monitored: ivancaceres

Notes
(0093684)
caristu   
2017-01-18 11:36   
Most probably, the problem is related with this[1].
If that is the problem, a possible solution to be checked: JavaMail is capable of using the OAuth2 authentication mechanism[2].

[1] https://security.googleblog.com/2014/04/new-security-measures-will-affect-older.html [^]
[2] https://java.net/projects/javamail/pages/OAuth2 [^]
(0093753)
alostale   
2017-01-20 09:13   
Moving to design defect: a fix for this would require to implement a different authentication mechanism.