From b786593ef856cc0e4d62073563cadf89b3068cec Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 31 Jul 2014 13:13:05 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20connect=20if=20already=20connect?= =?utf8?q?ed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/rhynodge/actions/EmailAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. */ -- 2.7.4