Package de.trustable.ca3s.core.service
Class MailService
- java.lang.Object
-
- de.trustable.ca3s.core.service.MailService
-
@Service public class MailService extends Object
Service for sending emails.We use the
Asyncannotation to send emails asynchronously.
-
-
Constructor Summary
Constructors Constructor Description MailService(tech.jhipster.config.JHipsterProperties jHipsterProperties, org.springframework.mail.javamail.JavaMailSender javaMailSender, org.springframework.context.MessageSource messageSource, org.thymeleaf.spring5.SpringTemplateEngine templateEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsendActivationEmail(User user)voidsendCreationEmail(User user)voidsendEmail(String to, String[] cc, String subject, String content, boolean isMultipart, boolean isHtml)voidsendEmailFromTemplate(User user, String templateName, String titleKey)voidsendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String[] cc, String templateName, String titleKey)voidsendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String[] cc, String templateName, String titleKey, String[] args)voidsendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String email, String[] cc, String templateName, String titleKey)voidsendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String email, String[] cc, String templateName, String titleKey, String[] args)voidsendPasswordResetMail(User user)
-
-
-
Method Detail
-
sendEmail
public void sendEmail(String to, String[] cc, String subject, String content, boolean isMultipart, boolean isHtml) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
sendEmailFromTemplate
public void sendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String email, String[] cc, String templateName, String titleKey) throws javax.mail.MessagingException- Throws:
javax.mail.MessagingException
-
sendEmailFromTemplate
public void sendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String[] cc, String templateName, String titleKey) throws javax.mail.MessagingException- Throws:
javax.mail.MessagingException
-
sendEmailFromTemplate
public void sendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String[] cc, String templateName, String titleKey, String[] args) throws javax.mail.MessagingException- Throws:
javax.mail.MessagingException
-
sendEmailFromTemplate
public void sendEmailFromTemplate(org.thymeleaf.context.Context context, User user, String email, String[] cc, String templateName, String titleKey, String[] args) throws javax.mail.MessagingException- Throws:
javax.mail.MessagingException
-
sendEmailFromTemplate
public void sendEmailFromTemplate(User user, String templateName, String titleKey) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
sendActivationEmail
public void sendActivationEmail(User user) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
sendCreationEmail
public void sendCreationEmail(User user) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
sendPasswordResetMail
public void sendPasswordResetMail(User user) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
-