Revision 49360
Added by Sofia Baltzi over 6 years ago
modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/ForgotPasswordServlet.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.openaire.usermanagement; |
2 | 2 |
|
3 | 3 |
import com.unboundid.ldap.sdk.LDAPException; |
4 |
import eu.dnetlib.openaire.user.utils.EmailActions;
|
|
4 |
import eu.dnetlib.openaire.user.utils.EmailSender;
|
|
5 | 5 |
import eu.dnetlib.openaire.user.utils.LDAPActions; |
6 | 6 |
import eu.dnetlib.openaire.user.utils.VerificationActions; |
7 | 7 |
import org.apache.log4j.Logger; |
... | ... | |
46 | 46 |
|
47 | 47 |
String formEmail = request.getParameter("email"); |
48 | 48 |
|
49 |
logger.debug("I am in do post for " + formEmail); |
|
50 |
|
|
49 | 51 |
if (formEmail == null) { |
50 | 52 |
request.getSession().setAttribute("message", "Error reading email."); |
51 | 53 |
response.sendRedirect("./forgotPassword.jsp"); |
... | ... | |
82 | 84 |
"\n" + |
83 | 85 |
"The verification code is" + verificationCode.toString() + "\n Thank you"; |
84 | 86 |
|
85 |
verificationCodeSubject = "Your OpenAIRE password reset request"; |
|
87 |
String verificationCodeSubject = "Your OpenAIRE password reset request";
|
|
86 | 88 |
|
87 |
emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg) |
|
89 |
emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg);
|
|
88 | 90 |
|
89 | 91 |
} |
90 | 92 |
|
modules/dnet-openaire-users/trunk/pom.xml | ||
---|---|---|
44 | 44 |
<artifactId>uoa-user-management</artifactId> |
45 | 45 |
<version>2.0.0-SNAPSHOT</version> |
46 | 46 |
</dependency> |
47 |
<dependency> |
|
48 |
<groupId>javax.mail</groupId> |
|
49 |
<artifactId>mail</artifactId> |
|
50 |
<version>1.4</version> |
|
51 |
</dependency> |
|
52 | 47 |
</dependencies> |
53 | 48 |
|
54 | 49 |
</project> |
Also available in: Unified diff
Fix errors for mailSender