mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 03:43:48 +01:00
Improve message for SMTP server not configured.
This commit is contained in:
parent
538e0196e2
commit
cd46647602
@ -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<String, Object> model = new HashMap<String, Object>();
|
||||
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<String, Object> model = new HashMap<String, Object>();
|
||||
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) {
|
||||
|
@ -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=<gmail-user-account>
|
||||
mail.password=<gmail-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=<gmail-user-account>
|
||||
#mail.password=<gmail-password>
|
||||
#mail.smtp.auth=true
|
||||
#mail.smtp.starttls.enable=true
|
||||
#mail.smtp.quitwait=false
|
||||
|
||||
#------------------------
|
||||
# Emails configuration
|
||||
|
Loading…
Reference in New Issue
Block a user