Merge pull request #83 from mwoodiupui/DS-1182-simple

[DS-1182] Get a fresh Session each time
This commit is contained in:
Mark Diggory
2012-09-21 19:55:12 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ public class DailyReportEmailer
props.put("mail.smtp.host", server); props.put("mail.smtp.host", server);
// Get session // Get session
Session session = Session.getDefaultInstance(props, null); Session session = Session.getInstance(props, null);
MimeMessage msg = new MimeMessage(session); MimeMessage msg = new MimeMessage(session);
Multipart multipart = new MimeMultipart(); Multipart multipart = new MimeMultipart();

View File

@@ -270,7 +270,7 @@ public class Email
props.put("mail.smtp.auth", "true"); props.put("mail.smtp.auth", "true");
SMTPAuthenticator smtpAuthenticator = new SMTPAuthenticator( SMTPAuthenticator smtpAuthenticator = new SMTPAuthenticator(
username, password); username, password);
session = Session.getDefaultInstance(props, smtpAuthenticator); session = Session.getInstance(props, smtpAuthenticator);
} }
else else
{ {