diff options
Diffstat (limited to 'juick-api/src/main/java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/EmailManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/juick-api/src/main/java/com/juick/api/EmailManager.java b/juick-api/src/main/java/com/juick/api/EmailManager.java index eca2dfa30..edf7c000c 100644 --- a/juick-api/src/main/java/com/juick/api/EmailManager.java +++ b/juick-api/src/main/java/com/juick/api/EmailManager.java @@ -17,6 +17,8 @@ import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; +import java.util.Properties; + import static com.juick.formatters.PlainTextFormatter.formatPost; import static com.juick.formatters.PlainTextFormatter.formatUrl; @@ -42,7 +44,9 @@ public class EmailManager implements ApplicationListener<MessageEvent> { } void emailNotify(String email, Message msg) { - Session session = Session.getDefaultInstance(System.getProperties()); + Properties prop = System.getProperties(); + prop.put("mail.smtp.starttls.enable", "true"); + Session session = Session.getDefaultInstance(prop); try { MimeMessage message = new MimeMessage(session); message.setFrom(new InternetAddress("juick@juick.com")); |