Contribution
[ 1713587 ] Enable Adempiere to work with Google email
This commit is contained in:
parent
5ee7668131
commit
419e7110a6
|
@ -102,6 +102,10 @@ public final class EMail implements Serializable
|
||||||
private String m_messageHTML;
|
private String m_messageHTML;
|
||||||
/** Mail SMTP Server */
|
/** Mail SMTP Server */
|
||||||
private String m_smtpHost;
|
private String m_smtpHost;
|
||||||
|
/** Mail SMTP Server Port */
|
||||||
|
private int m_smtpPort = 0; // @Trifon
|
||||||
|
/** SMTP enable start TLS */
|
||||||
|
private boolean m_smtpStarttlsEnable = false; // @Trifon
|
||||||
/** Attachments */
|
/** Attachments */
|
||||||
private ArrayList<Object> m_attachments;
|
private ArrayList<Object> m_attachments;
|
||||||
/** UserName and Password */
|
/** UserName and Password */
|
||||||
|
@ -149,6 +153,13 @@ public final class EMail implements Serializable
|
||||||
{
|
{
|
||||||
if (m_auth != null) // createAuthenticator was called
|
if (m_auth != null) // createAuthenticator was called
|
||||||
props.put("mail.smtp.auth", "true");
|
props.put("mail.smtp.auth", "true");
|
||||||
|
if (m_smtpPort > 0) {
|
||||||
|
props.put("mail.smtp.port", "587"); // @Trifon TODO
|
||||||
|
}
|
||||||
|
if (m_smtpStarttlsEnable) {
|
||||||
|
props.put("mail.smtp.starttls.enable", "true"); // @Trifon
|
||||||
|
}
|
||||||
|
|
||||||
session = Session.getInstance(props, m_auth);
|
session = Session.getInstance(props, m_auth);
|
||||||
session.setDebug(CLogMgt.isLevelFinest());
|
session.setDebug(CLogMgt.isLevelFinest());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue