Package io.jmix.email.impl
Class EmailSenderImpl
java.lang.Object
io.jmix.email.impl.EmailSenderImpl
- All Implemented Interfaces:
EmailSender
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CorePropertiesprotected org.springframework.mail.javamail.JavaMailSenderprotected io.micrometer.core.instrument.MeterRegistryprotected TimeSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassignFromAddress(SendingMessage sendingMessage, javax.mail.internet.MimeMessage msg) protected voidassignRecipient(javax.mail.Message.RecipientType type, String addresses, javax.mail.internet.MimeMessage message) protected javax.mail.internet.MimeBodyPartcreateAttachmentPart(SendingAttachment attachment) protected javax.mail.internet.MimeMessagecreateMimeMessage(SendingMessage sendingMessage) protected StringgenerateAttachmentContentId(String attachmentName) voidsendEmail(SendingMessage sendingMessage) Sends email with help ofJavaMailSender.protected voidsetMimeMessageContent(SendingMessage sendingMessage, javax.mail.internet.MimeMultipart content, javax.mail.internet.MimeMultipart textPart) splitAddresses(String addresses)
-
Field Details
-
mailSender
@Autowired protected org.springframework.mail.javamail.JavaMailSender mailSender -
timeSource
-
coreProperties
-
meterRegistry
@Autowired protected io.micrometer.core.instrument.MeterRegistry meterRegistry
-
-
Constructor Details
-
EmailSenderImpl
public EmailSenderImpl()
-
-
Method Details
-
sendEmail
Description copied from interface:EmailSenderSends email with help ofJavaMailSender. Message body and attachments' content must be loaded from file storage.
UseEmailerinstead if you need email to be delivered reliably and stored to email history.- Specified by:
sendEmailin interfaceEmailSender- 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
-
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
-