Use Session.getInstance() rather than Session.getDefaultInstance(). This creates a new Session for
each Mail() object, creating an additional overhead of ~10millis, but it picks up changes in the properties files, fixing bug 308. http://www.helma.org/bugs/show_bug.cgi?id=308
This commit is contained in:
parent
7040da5438
commit
0ea547488b
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ public class MailObject extends ScriptableObject implements Serializable {
|
|||
|
||||
props.put("mail.smtp.host", mprops.getProperty("smtp", "mail"));
|
||||
|
||||
Session session = Session.getDefaultInstance(props, null);
|
||||
Session session = Session.getInstance(props);
|
||||
|
||||
message = new MimeMessage(session);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue