public class MimeMessageManager extends Object
Constructor and Description |
---|
MimeMessageManager(Logger log) |
Modifier and Type | Method and Description |
---|---|
com.sun.mail.smtp.SMTPMessage |
buildSMTPMessage(javax.mail.Session session,
ProvideDescriptor provideDescriptor,
org.ow2.petals.component.framework.api.message.Exchange exchange,
String mailBody)
Create a
SMTPMessage from the given NormalizedMessage , including mail Session
information. |
protected void |
setMimeMessageAttachments(javax.mail.Multipart multipart,
org.ow2.petals.component.framework.api.message.Exchange exchange)
Add
NormalizedMessage attachments to MimeMessage attachments. |
public com.sun.mail.smtp.SMTPMessage buildSMTPMessage(javax.mail.Session session, ProvideDescriptor provideDescriptor, org.ow2.petals.component.framework.api.message.Exchange exchange, String mailBody) throws javax.jbi.messaging.MessagingException, MissingElementException
SMTPMessage
from the given NormalizedMessage
, including mail Session
information.session
- the mail Session
provideDescriptor
- the SessionDescriptor
exchange
- the mapped NormalizedMessage
mailBody
- The mail body messageSMTPMessage
javax.mail.MessagingException
- if an error occurs during e-mail messafe creationMissingElementException
javax.jbi.messaging.MessagingException
protected void setMimeMessageAttachments(javax.mail.Multipart multipart, org.ow2.petals.component.framework.api.message.Exchange exchange) throws javax.jbi.messaging.MessagingException
NormalizedMessage
attachments to MimeMessage
attachments. If an error occurs during the
transmission of an attachment, it is skipped and the process continues with other attachments.multipart
- the Multipart
used to handle attachmentsin
- the NormalizedMessage
handling attachments that have to be transmittedjavax.jbi.messaging.MessagingException
Copyright © 2005-2018 Linagora. All Rights Reserved.