Fix errors for mailSender
This commit is contained in:
parent
38972f84f9
commit
ad65bfaf93
5
pom.xml
5
pom.xml
|
@ -44,11 +44,6 @@
|
|||
<artifactId>uoa-user-management</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package eu.dnetlib.openaire.usermanagement;
|
||||
|
||||
import com.unboundid.ldap.sdk.LDAPException;
|
||||
import eu.dnetlib.openaire.user.utils.EmailActions;
|
||||
import eu.dnetlib.openaire.user.utils.EmailSender;
|
||||
import eu.dnetlib.openaire.user.utils.LDAPActions;
|
||||
import eu.dnetlib.openaire.user.utils.VerificationActions;
|
||||
import org.apache.log4j.Logger;
|
||||
|
@ -46,6 +46,8 @@ public class ForgotPasswordServlet extends HttpServlet {
|
|||
|
||||
String formEmail = request.getParameter("email");
|
||||
|
||||
logger.debug("I am in do post for " + formEmail);
|
||||
|
||||
if (formEmail == null) {
|
||||
request.getSession().setAttribute("message", "Error reading email.");
|
||||
response.sendRedirect("./forgotPassword.jsp");
|
||||
|
@ -82,9 +84,9 @@ public class ForgotPasswordServlet extends HttpServlet {
|
|||
"\n" +
|
||||
"The verification code is" + verificationCode.toString() + "\n Thank you";
|
||||
|
||||
verificationCodeSubject = "Your OpenAIRE password reset request";
|
||||
String verificationCodeSubject = "Your OpenAIRE password reset request";
|
||||
|
||||
emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg)
|
||||
emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue