Change email format and add link for verification

This commit is contained in:
Sofia Baltzi 2017-11-07 12:41:53 +00:00
parent e986b0c883
commit 7314282429
3 changed files with 22 additions and 14 deletions

View File

@ -73,13 +73,21 @@ public class ForgotPasswordServlet extends HttpServlet {
verificationActions.updateVerificationEntry(username, verificationCode.toString(), timestamp);
}
String verificationCodeMsg = "Hello,\n" +
"\n" +
"A request has been made to reset your OpenAIRE account password. To reset your\n" +
"password, you will need to submit this verification code in order to verify that the\n" +
"request was legitimate.\n" +
"\n" +
"The verification code is " + verificationCode.toString() + "\n Thank you";
String scheme = request.getScheme();
String serverName = request.getServerName();
int portNumber = request.getServerPort();
String contextPath = request.getContextPath();
String resultPath = scheme + "://" +serverName + ":" +portNumber + contextPath + "/verify.jsp";
String verificationCodeMsg = "<p>Hello,</p>" +
"<p> A request has been made to reset your OpenAIRE account password. To reset your " +
"password, you will need to submit this verification code in order to verify that the " +
"request was legitimate.</p>" +
"<p> The verification code is " + verificationCode.toString() + "</p>" +
"Select the URL below and proceed with verification." +
"<p><a href=" + resultPath + ">" + resultPath + "</a></p>" +
"<p>Thank you</p>";
String verificationCodeSubject = "Your OpenAIRE password reset request";

View File

@ -87,16 +87,15 @@ public class RegisterServlet extends HttpServlet {
String resultPath = scheme + "://" +serverName + ":" +portNumber + contextPath + "/activate.jsp";
String verificationCodeMsg = "<p>Hello " + username + ",</p>" +
"<p> " +
"A request has been made to verify your email and activate your OpenAIRE account. To activate your " +
"<p> A request has been made to verify your email and activate your OpenAIRE account. To activate your " +
"account, you will need to submit your username and this activation code in order to verify that the" +
"request was legitimate.</p>" +
"<p>" +
"The activation code is " + verificationCode.toString() +
"</p>" +
"Select the URL below and proceed with activating your password." +
"<p><a href=" + resultPath + ">" + resultPath + "</a></p>"
+"<p>Thank you</p>";
"<p><a href=" + resultPath + ">" + resultPath + "</a></p>" +
"<p>Thank you</p>";
String verificationCodeSubject = "Activate your OpenAIRE account";

View File

@ -49,9 +49,10 @@ public class RemindUsernameServlet extends HttpServlet {
String username = ldapActions.getUsername(formEmail);
if (username != null && !username.isEmpty()) {
String verificationCodeMsg = "Hello,\n" +
"\n" + "A username reminder has been requested for your OpenAIRE account.\n" +
" Your username is "+ username + ". Thank you. ";
String verificationCodeMsg = "<p>Hello,</p>" +
"<p> A username reminder has been requested for your OpenAIRE account.</p>" +
"<p> Your username is "+ username + ".</p>" +
"<p> Thank you </p>";
String verificationCodeSubject = "Your OpenAIRE username";