From: David ‘Bombe’ Roden Date: Thu, 31 Jul 2014 11:13:05 +0000 (+0200) Subject: Don’t connect if already connected. X-Git-Tag: v2~223 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b786593ef856cc0e4d62073563cadf89b3068cec;p=rhynodge.git Don’t connect if already connected. --- diff --git a/src/main/java/net/pterodactylus/rhynodge/actions/EmailAction.java b/src/main/java/net/pterodactylus/rhynodge/actions/EmailAction.java index b781f4d..cedde47 100644 --- a/src/main/java/net/pterodactylus/rhynodge/actions/EmailAction.java +++ b/src/main/java/net/pterodactylus/rhynodge/actions/EmailAction.java @@ -105,7 +105,9 @@ public class EmailAction implements Action { addHtmlPart(output, multipart); message.setContent(multipart); - transport.connect(); + if (!transport.isConnected()) { + transport.connect(); + } transport.sendMessage(message, message.getAllRecipients()); } catch (MessagingException me1) { /* swallow. */