Revision 49836
Added by Sofia Baltzi over 6 years ago
ForgotPasswordServlet.java | ||
---|---|---|
73 | 73 |
verificationActions.updateVerificationEntry(username, verificationCode.toString(), timestamp); |
74 | 74 |
} |
75 | 75 |
|
76 |
String verificationCodeMsg = "Hello,\n" + |
|
77 |
"\n" + |
|
78 |
"A request has been made to reset your OpenAIRE account password. To reset your\n" + |
|
79 |
"password, you will need to submit this verification code in order to verify that the\n" + |
|
80 |
"request was legitimate.\n" + |
|
81 |
"\n" + |
|
82 |
"The verification code is " + verificationCode.toString() + "\n Thank you"; |
|
76 |
String scheme = request.getScheme(); |
|
77 |
String serverName = request.getServerName(); |
|
78 |
int portNumber = request.getServerPort(); |
|
79 |
String contextPath = request.getContextPath(); |
|
83 | 80 |
|
81 |
String resultPath = scheme + "://" +serverName + ":" +portNumber + contextPath + "/verify.jsp"; |
|
82 |
|
|
83 |
String verificationCodeMsg = "<p>Hello,</p>" + |
|
84 |
"<p> A request has been made to reset your OpenAIRE account password. To reset your " + |
|
85 |
"password, you will need to submit this verification code in order to verify that the " + |
|
86 |
"request was legitimate.</p>" + |
|
87 |
"<p> The verification code is " + verificationCode.toString() + "</p>" + |
|
88 |
"Select the URL below and proceed with verification." + |
|
89 |
"<p><a href=" + resultPath + ">" + resultPath + "</a></p>" + |
|
90 |
"<p>Thank you</p>"; |
|
91 |
|
|
84 | 92 |
String verificationCodeSubject = "Your OpenAIRE password reset request"; |
85 | 93 |
|
86 | 94 |
emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg); |
Also available in: Unified diff
Change email format and add link for verification