mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 13:33:08 +00:00
Merge pull request #83 from mwoodiupui/DS-1182-simple
[DS-1182] Get a fresh Session each time
This commit is contained in:
@@ -86,7 +86,7 @@ public class DailyReportEmailer
|
||||
props.put("mail.smtp.host", server);
|
||||
|
||||
// Get session
|
||||
Session session = Session.getDefaultInstance(props, null);
|
||||
Session session = Session.getInstance(props, null);
|
||||
|
||||
MimeMessage msg = new MimeMessage(session);
|
||||
Multipart multipart = new MimeMultipart();
|
||||
|
@@ -270,7 +270,7 @@ public class Email
|
||||
props.put("mail.smtp.auth", "true");
|
||||
SMTPAuthenticator smtpAuthenticator = new SMTPAuthenticator(
|
||||
username, password);
|
||||
session = Session.getDefaultInstance(props, smtpAuthenticator);
|
||||
session = Session.getInstance(props, smtpAuthenticator);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user