Search in sources :

Example 6 with HtmlEmail

use of pl.pollub.cs.pentagoncafe.flare.component.email.HtmlEmail in project Flare-event-calendar by PollubCafe.

the class SecurityServiceImpl method sendResetPasswordEmail.

private void sendResetPasswordEmail(Email email) {
    try {
        checkArgument(email instanceof HtmlEmail);
        emailSender.send((HtmlEmail) email);
    } catch (MessagingException e) {
        e.printStackTrace();
        throw new SendingResetPasswordEmailFailException();
    }
}
Also used : SendingResetPasswordEmailFailException(pl.pollub.cs.pentagoncafe.flare.exception.sendingEmail.SendingResetPasswordEmailFailException) MessagingException(javax.mail.MessagingException) HtmlEmail(pl.pollub.cs.pentagoncafe.flare.component.email.HtmlEmail)

Aggregations

HtmlEmail (pl.pollub.cs.pentagoncafe.flare.component.email.HtmlEmail)6 MessagingException (javax.mail.MessagingException)3 Context (org.thymeleaf.context.Context)3 Email (pl.pollub.cs.pentagoncafe.flare.component.email.Email)1 Event (pl.pollub.cs.pentagoncafe.flare.domain.Event)1 User (pl.pollub.cs.pentagoncafe.flare.domain.User)1 ObjectNotFoundException (pl.pollub.cs.pentagoncafe.flare.exception.ObjectNotFoundException)1 SendingActivationEmailFailException (pl.pollub.cs.pentagoncafe.flare.exception.sendingEmail.SendingActivationEmailFailException)1 SendingEmailException (pl.pollub.cs.pentagoncafe.flare.exception.sendingEmail.SendingEmailException)1 SendingResetPasswordEmailFailException (pl.pollub.cs.pentagoncafe.flare.exception.sendingEmail.SendingResetPasswordEmailFailException)1