From 419e7110a62162cc4864881c0edb336a7fc994a6 Mon Sep 17 00:00:00 2001 From: trifonnt Date: Sat, 5 May 2007 21:56:22 +0000 Subject: [PATCH] Contribution [ 1713587 ] Enable Adempiere to work with Google email --- dbPort/src/org/compiere/util/EMail.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dbPort/src/org/compiere/util/EMail.java b/dbPort/src/org/compiere/util/EMail.java index c8aa1533f8..d7d4454b64 100644 --- a/dbPort/src/org/compiere/util/EMail.java +++ b/dbPort/src/org/compiere/util/EMail.java @@ -102,6 +102,10 @@ public final class EMail implements Serializable private String m_messageHTML; /** Mail SMTP Server */ 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 */ private ArrayList m_attachments; /** UserName and Password */ @@ -149,6 +153,13 @@ public final class EMail implements Serializable { if (m_auth != null) // createAuthenticator was called 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.setDebug(CLogMgt.isLevelFinest()); }