diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java index 04ab63c9..b7c86d97 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java @@ -117,6 +117,7 @@ final public class NotificationService { } private void handleException(Exception e) { + System.err.println("An expected error has occurred trying to send an email notification. Usually, the main reason for this is that the SMTP server properties has not been configured properly. Edit the WEB-INF/app.properties file and verify the SMTP server configuration properties."); e.printStackTrace(); } @@ -136,12 +137,16 @@ final public class NotificationService { } public void sendRegistrationEmail(@NotNull User user) { - final Map model = new HashMap(); - model.put("user", user); - final String activationUrl = "http://wisemapping.com/c/activation?code=" + user.getActivationCode(); - model.put("emailcheck", activationUrl); - mailer.sendEmail(mailer.getServerSenderEmail(), user.getEmail(), "Welcome to Wisemapping!", model, - "confirmationMail.vm"); + try { + final Map model = new HashMap(); + model.put("user", user); + final String activationUrl = "http://wisemapping.com/c/activation?code=" + user.getActivationCode(); + model.put("emailcheck", activationUrl); + mailer.sendEmail(mailer.getServerSenderEmail(), user.getEmail(), "Welcome to Wisemapping!", model, + "confirmationMail.vm"); + } catch (Exception e) { + handleException(e); + } } public void reportMindmapEditorError(@NotNull MindMap mindmap, @NotNull User user, @NotNull String userAgent, @Nullable String jsErrorMsg) { diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index 010e87a1..71ced63e 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -24,6 +24,13 @@ database.password= #------------------------ # Plain SMTP Server Configuration #------------------------ +mail.smtp.port=465 +mail.smtp.host=localhost +mail.username=root +mail.password= +mail.smtp.auth=false +mail.smtp.starttls.enable=false +mail.smtp.quitwait=false #------------------------ # SSL SMTP Server Configuration @@ -32,13 +39,13 @@ database.password= #------------------------ # GMAIL SMTP Configuration #------------------------ -mail.smtp.port=587 -mail.smtp.host=smtp.gmail.com -mail.username= -mail.password= -mail.smtp.auth=true -mail.smtp.starttls.enable=true -mail.smtp.quitwait=false +#mail.smtp.port=587 +#mail.smtp.host=smtp.gmail.com +#mail.username= +#mail.password= +#mail.smtp.auth=true +#mail.smtp.starttls.enable=true +#mail.smtp.quitwait=false #------------------------ # Emails configuration