diff --git a/src/main/java/org/gcube/common/portal/mailing/EmailNotification.java b/src/main/java/org/gcube/common/portal/mailing/EmailNotification.java index 8aed030..7aa8031 100644 --- a/src/main/java/org/gcube/common/portal/mailing/EmailNotification.java +++ b/src/main/java/org/gcube/common/portal/mailing/EmailNotification.java @@ -85,7 +85,7 @@ public class EmailNotification { emailBody.append("

") .append("

") .append("WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain ") - .append("information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message.") + .append("information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. ") .append("If you have received this communication in error, please notify the and destroy and delete any copies you may have received.") .append("

"); } @@ -105,18 +105,14 @@ public class EmailNotification { Session session = Session.getDefaultInstance(props, null); session.setDebug(true); Message mimeMessage = new MimeMessage(session); - Transport t = null; try { - t = session.getTransport("smtp");; // EMAIL SENDER String emailSender = PortalContext.getConfiguration().getSenderEmail(request); String siteName = PortalContext.getConfiguration().getGatewayName(request); Address from = new InternetAddress(emailSender, siteName); mimeMessage.setHeader("Content-Type", "text/html; charset=UTF-8"); mimeMessage.setFrom(from); - - t.connect(); - + // EMAIL RECIPIENTS for (int i=0; i