Class EmailSenderImpl

java.lang.Object
io.jmix.email.impl.EmailSenderImpl
All Implemented Interfaces:
EmailSender

@Component("email_EmailSender") public class EmailSenderImpl extends Object implements EmailSender
  • Field Details

    • mailSender

      @Autowired protected org.springframework.mail.javamail.JavaMailSender mailSender
    • timeSource

      @Autowired protected TimeSource timeSource
    • coreProperties

      @Autowired protected CoreProperties coreProperties
    • meterRegistry

      @Autowired protected io.micrometer.core.instrument.MeterRegistry meterRegistry
  • Constructor Details

    • EmailSenderImpl

      public EmailSenderImpl()
  • Method Details

    • sendEmail

      public void sendEmail(SendingMessage sendingMessage) throws javax.mail.MessagingException
      Description copied from interface: EmailSender
      Sends email with help of JavaMailSender. Message body and attachments' content must be loaded from file storage.
      Use Emailer instead if you need email to be delivered reliably and stored to email history.
      Specified by:
      sendEmail in interface EmailSender
      Throws:
      javax.mail.MessagingException - if delivery fails
    • createMimeMessage

      protected javax.mail.internet.MimeMessage createMimeMessage(SendingMessage sendingMessage) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • setMimeMessageContent

      protected void setMimeMessageContent(SendingMessage sendingMessage, javax.mail.internet.MimeMultipart content, javax.mail.internet.MimeMultipart textPart) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • assignRecipient

      protected void assignRecipient(javax.mail.Message.RecipientType type, String addresses, javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • splitAddresses

      protected Iterable<String> splitAddresses(String addresses)
    • assignFromAddress

      protected void assignFromAddress(SendingMessage sendingMessage, javax.mail.internet.MimeMessage msg) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • createAttachmentPart

      protected javax.mail.internet.MimeBodyPart createAttachmentPart(SendingAttachment attachment) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • generateAttachmentContentId

      protected String generateAttachmentContentId(String attachmentName)