IDEMPIERE-2291 zk7 - send email broken
This commit is contained in:
parent
c7151bb162
commit
b4d9087303
|
@ -354,7 +354,13 @@ public final class EMail implements Serializable
|
||||||
t.connect();
|
t.connect();
|
||||||
// t.connect(m_smtpHost, user, password);
|
// t.connect(m_smtpHost, user, password);
|
||||||
// log.fine("transport connected");
|
// log.fine("transport connected");
|
||||||
|
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
|
||||||
|
try {
|
||||||
|
Thread.currentThread().setContextClassLoader(javax.mail.Session.class.getClassLoader());
|
||||||
Transport.send(m_msg);
|
Transport.send(m_msg);
|
||||||
|
} finally {
|
||||||
|
Thread.currentThread().setContextClassLoader(tcl);
|
||||||
|
}
|
||||||
// t.sendMessage(msg, msg.getAllRecipients());
|
// t.sendMessage(msg, msg.getAllRecipients());
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Success - MessageID=" + m_msg.getMessageID());
|
if (log.isLoggable(Level.FINE)) log.fine("Success - MessageID=" + m_msg.getMessageID());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue