Package io.jmix.email.impl
Class EmailSenderImpl
java.lang.Object
io.jmix.email.impl.EmailSenderImpl
- All Implemented Interfaces:
- EmailSender
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected CorePropertiesprotected org.springframework.mail.javamail.JavaMailSenderprotected io.micrometer.core.instrument.MeterRegistryprotected TimeSource
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidassignFromAddress(SendingMessage sendingMessage, jakarta.mail.internet.MimeMessage msg) protected voidassignRecipient(jakarta.mail.Message.RecipientType type, String addresses, jakarta.mail.internet.MimeMessage message) protected jakarta.mail.internet.MimeBodyPartcreateAttachmentPart(SendingAttachment attachment) protected jakarta.mail.internet.MimeMessagecreateMimeMessage(SendingMessage sendingMessage) protected StringgenerateAttachmentContentId(String attachmentName) voidsendEmail(SendingMessage sendingMessage) Sends email with help ofJavaMailSender.protected voidsetMimeMessageContent(SendingMessage sendingMessage, jakarta.mail.internet.MimeMultipart content, jakarta.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- 
EmailSenderImplpublic EmailSenderImpl()
 
- 
- 
Method Details- 
sendEmailDescription 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 interface- EmailSender
- Throws:
- jakarta.mail.MessagingException- if delivery fails
 
- 
createMimeMessageprotected jakarta.mail.internet.MimeMessage createMimeMessage(SendingMessage sendingMessage) throws jakarta.mail.MessagingException - Throws:
- jakarta.mail.MessagingException
 
- 
setMimeMessageContentprotected void setMimeMessageContent(SendingMessage sendingMessage, jakarta.mail.internet.MimeMultipart content, jakarta.mail.internet.MimeMultipart textPart) throws jakarta.mail.MessagingException - Throws:
- jakarta.mail.MessagingException
 
- 
assignRecipientprotected void assignRecipient(jakarta.mail.Message.RecipientType type, String addresses, jakarta.mail.internet.MimeMessage message) throws jakarta.mail.MessagingException - Throws:
- jakarta.mail.MessagingException
 
- 
splitAddresses
- 
assignFromAddressprotected void assignFromAddress(SendingMessage sendingMessage, jakarta.mail.internet.MimeMessage msg) throws jakarta.mail.MessagingException - Throws:
- jakarta.mail.MessagingException
 
- 
createAttachmentPartprotected jakarta.mail.internet.MimeBodyPart createAttachmentPart(SendingAttachment attachment) throws jakarta.mail.MessagingException - Throws:
- jakarta.mail.MessagingException
 
- 
generateAttachmentContentId
 
-