Skip to content

Commit

Permalink
Mailtransport connection (#117)
Browse files Browse the repository at this point in the history
Close session after mail was sent

Co-authored-by: michael.gruber <michael.gruber@wwk.de>
  • Loading branch information
2 people authored and mederly committed Apr 7, 2020
1 parent 30c22e6 commit 8f6f39f
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -326,6 +326,7 @@ public String getContentType() {
long duration = System.currentTimeMillis() - start;
task.recordState("Notification mail sent successfully via " + host + ", in " + duration + " ms overall.");
task.recordNotificationOperation(NAME, true, duration);
t.close();
return;
} catch (MessagingException e) {
String msg = "Couldn't send mail message to " + mailMessage.getTo() + " via " + host + ", trying another mail server, if there is any";
Expand Down

0 comments on commit 8f6f39f

Please sign in to comment.