Project

General

Profile

« Previous | Next » 

Revision 49835

Added by Sofia Baltzi over 6 years ago

Change email format and add link for activation

View differences:

modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServlet.java
79 79
                         verificationActions.updateVerificationEntry(username, verificationCode.toString(), timestamp);
80 80
                     }
81 81

  
82
                     String verificationCodeMsg = "Hello " + username + ",\n" +
83
                             "\n" +
84
                             "A request has been made to verify your email and activate your OpenAIRE account. To activate your\n" +
85
                             "account, you will need to submit your username and this activation code in order to verify that the\n" +
86
                             "request was legitimate.\n" +
87
                             "\n" +
88
                             "The activation code is " + verificationCode.toString() + "\n Thank you";
82
                     String scheme = request.getScheme();
83
                     String serverName = request.getServerName();
84
                     int portNumber = request.getServerPort();
85
                     String contextPath = request.getContextPath();
89 86

  
87
                     String resultPath = scheme + "://" +serverName + ":" +portNumber + contextPath + "/activate.jsp";
88

  
89
                     String verificationCodeMsg = "<p>Hello " + username + ",</p>" +
90
                             "<p> " +
91
                             "A request has been made to verify your email and activate your OpenAIRE account. To activate your " +
92
                             "account, you will need to submit your username and this activation code in order to verify that the" +
93
                             "request was legitimate.</p>" +
94
                             "<p>" +
95
                             "The activation code is " + verificationCode.toString() +
96
                             "</p>" +
97
                             "Select the URL below and proceed with activating your password." +
98
                             "<p><a href=" + resultPath + ">" + resultPath + "</a></p>"
99
                             +"<p>Thank you</p>";
100

  
90 101
                     String verificationCodeSubject = "Activate your OpenAIRE account";
91 102

  
92 103
                     emailSender.sendEmail(email, verificationCodeSubject, verificationCodeMsg);

Also available in: Unified diff