IDEMPIERE-4356 : System properties shouldn't not be used when sending emails (#154)

* IDEMPIERE-4356

Using Hiep's idea

Co-Authored-By: hieplq <hieplq@users.noreply.github.com>

* IDEMPIERE-4356

Following Carlos's tests/advices, add current System Properties to the Properties initialized for the email

Co-Authored-By: Carlos Ruiz <carg67@gmail.com>

Co-authored-by: hieplq <hieplq@users.noreply.github.com>
Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
Nicolas Micoud 2020-07-04 11:13:45 +02:00 committed by GitHub
parent d6e5cdc26a
commit 4c1236e938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -252,7 +252,8 @@ public final class EMail implements Serializable
return m_sentMsg; return m_sentMsg;
} }
// //
Properties props = System.getProperties(); Properties props = new Properties();
props.putAll(System.getProperties());
props.put("mail.store.protocol", "smtp"); props.put("mail.store.protocol", "smtp");
props.put("mail.transport.protocol", "smtp"); props.put("mail.transport.protocol", "smtp");
props.put("mail.host", m_smtpHost); props.put("mail.host", m_smtpHost);