public class JakartaMessagePartConverter extends Object
OutgoingMessage for using in a message
implementing the Message class.
| Constructor and Description |
|---|
JakartaMessagePartConverter() |
| Modifier and Type | Method and Description |
|---|---|
jakarta.mail.BodyPart |
convertAttachmentPart(EmailAttachment attachment)
Converts an email attachment to a
BodyPart instances. |
List<jakarta.mail.BodyPart> |
convertAttachmentParts(OutgoingMessage message)
Converts all the attachments in the
OutgoingMessage to a list of BodyPart. |
jakarta.mail.BodyPart |
convertBodyPart(ContentMessage content)
Converts a message content from
OutgoingMessage to an instance of the BodyPart class. |
List<jakarta.mail.BodyPart> |
convertBodyPart(OutgoingMessage message)
Converts all the contents of the
OutgoingMessage to a list of BodyPart. |
public List<jakarta.mail.BodyPart> convertBodyPart(OutgoingMessage message) throws CreateMessageException
OutgoingMessage to a list of BodyPart.message - an instance of the OutgoingMessageCreateMessageException - If creating one or more BodyPart instances failedpublic jakarta.mail.BodyPart convertBodyPart(ContentMessage content) throws CreateMessageException
OutgoingMessage to an instance of the BodyPart class.content - a message content. An instance of the ContentMessageBodyPart to uses in the Message.CreateMessageException - If creating a BodyPart instance failedpublic List<jakarta.mail.BodyPart> convertAttachmentParts(OutgoingMessage message) throws CreateMessageException
OutgoingMessage to a list of BodyPart.message - an instance of the OutgoingMessageBodyPart to uses in the Message.CreateMessageException - If creating a BodyPart instance failedpublic jakarta.mail.BodyPart convertAttachmentPart(EmailAttachment attachment) throws CreateMessageException
BodyPart instances.attachment - an instance of the EmailAttachment class.BodyPart for using in the Message class or its inheritors.CreateMessageException - If creating a BodyPart instance failedCopyright © 2023. All rights reserved.