Skip to content

Commit

Permalink
email content improved
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Nov 2, 2014
1 parent e308deb commit 3874b11
Showing 1 changed file with 11 additions and 2 deletions.
Expand Up @@ -229,7 +229,12 @@ private void sendConfirmationLinkEmail(Document doc, UserRegistrationBean userRe
try {
Element element = (Element) rootElement.appendChild(doc.createElementNS(NAMESPACE, "confirmation-link-email"));
if (sendNotificationsEnabled()) {
MailUtil.send(getResourceConfigProperty(FROM_ADDRESS_PROP_NAME), userRegBean.getEmail(), "Activate User Registration (sent by Yanel)", getActivationURL(userRegBean));
StringBuilder body = new StringBuilder();
body.append("Thank you for your registration.");
body.append("\n\nTo activate your account, you need to click on the following link:");
body.append("\n\n" + getActivationURL(userRegBean));
body.append("\n\nNote that this confirmation link is valid only for the next " + DEFAULT_TOTAL_VALID_HRS + " hours.");
MailUtil.send(getResourceConfigProperty(FROM_ADDRESS_PROP_NAME), userRegBean.getEmail(), "Activate User Registration (sent by Yanel)", body.toString());
element.setAttribute("sent-by-yanel", "true");
} else {
element.setAttribute("sent-by-yanel", "false");
Expand Down Expand Up @@ -496,7 +501,11 @@ protected boolean activateRegistration(String uuid, Document doc) {
String homepageURL = getHomepageURL();

if (sendNotificationsEnabled()) {
MailUtil.send(getResourceConfigProperty(FROM_ADDRESS_PROP_NAME), urBean.getEmail(), "User Registration Successful", homepageURL);
StringBuilder body = new StringBuilder();
body.append("Thank you for your registration.");
body.append("\n\nYou have successfully activated your account.");
body.append("\n\n" + homepageURL);
MailUtil.send(getResourceConfigProperty(FROM_ADDRESS_PROP_NAME), urBean.getEmail(), "User Registration Successful", body.toString());
}

Element rootElement = doc.getDocumentElement();
Expand Down

0 comments on commit 3874b11

Please sign in to comment.