Change email format and add link for activation
This commit is contained in:
parent
77191f58c4
commit
e986b0c883
|
@ -79,13 +79,24 @@ public class RegisterServlet extends HttpServlet {
|
|||
verificationActions.updateVerificationEntry(username, verificationCode.toString(), timestamp);
|
||||
}
|
||||
|
||||
String verificationCodeMsg = "Hello " + username + ",\n" +
|
||||
"\n" +
|
||||
"A request has been made to verify your email and activate your OpenAIRE account. To activate your\n" +
|
||||
"account, you will need to submit your username and this activation code in order to verify that the\n" +
|
||||
"request was legitimate.\n" +
|
||||
"\n" +
|
||||
"The activation 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 + "/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 " +
|
||||
"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>";
|
||||
|
||||
String verificationCodeSubject = "Activate your OpenAIRE account";
|
||||
|
||||
|
|
Loading…
Reference in New Issue