Ejemplo n.º 1
0
 private SimpleMailMessage constructEmail(String subject, String body, User user) {
   final SimpleMailMessage email = new SimpleMailMessage();
   email.setSubject(subject);
   email.setText(body);
   email.setTo(user.getEmail());
   email.setFrom(env.getProperty("support.email"));
   return email;
 }
Ejemplo n.º 2
0
 private final SimpleMailMessage constructEmailMessage(
     final OnRegistrationCompleteEvent event, final User user, final String token) {
   final String recipientAddress = user.getEmail();
   final String subject = "Registration Confirmation";
   final String confirmationUrl = event.getAppUrl() + "/regitrationConfirm.html?token=" + token;
   final String message = messages.getMessage("message.regSucc", null, event.getLocale());
   final SimpleMailMessage email = new SimpleMailMessage();
   email.setTo(recipientAddress);
   email.setSubject(subject);
   email.setText(message + " \r\n" + confirmationUrl);
   email.setFrom(env.getProperty("support.email"));
   return email;
 }