Class EMailService

java.lang.Object
de.gustavblass.fsu.fmi.roombooking.service.EMailService

@Service public class EMailService extends Object
Sends e-mails to Actors when something of relevance happens.
  • Field Details

    • mailSender

      @NonNull private final @NonNull org.springframework.mail.javamail.JavaMailSender mailSender
      Used to actually send the e-mails.
    • senderAddress

      @NonNull private final @NonNull String senderAddress
      The e-mail address of the account from which the e-mails are sent.
    • messageSource

      @NonNull private final @NonNull org.springframework.context.MessageSource messageSource
      Used to translate the e-mail subject.
    • templateEngine

      @NonNull private final @NonNull org.thymeleaf.TemplateEngine templateEngine
      Used to construct the actual content s of the e-mails.
    • environment

      @NonNull private final @NonNull org.springframework.core.env.Environment environment
      Used by certain e-mail templates.
  • Constructor Details

    • EMailService

      public EMailService(@NonNull @NonNull org.springframework.mail.javamail.JavaMailSender mailSender, @NonNull @Value("${spring.mail.username:}") @NonNull String senderAddress, @NonNull @NonNull org.springframework.context.MessageSource messageSource, @NonNull @NonNull org.thymeleaf.TemplateEngine eMailTemplateEngine, @NonNull @NonNull org.springframework.core.env.Environment environment)
      Constructs a new EMailService.
      Parameters:
      mailSender - The mailSender.
      senderAddress - The senderAddress.
      messageSource - The messageSource.
      eMailTemplateEngine - The templateEngine.
      environment - The environment.
  • Method Details