public class EmailMessageWithAttachments extends Object
| Constructor and Description |
|---|
EmailMessageWithAttachments(EmailMessage emailMessage)
Constructor for the EmailAttachments.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(BodyPart part)
Adds an attachment to the EmailMessage.
|
void |
addAttachment(byte[] content,
String filename,
String mimetype)
Adds the attachment.
|
void |
addAttachment(DataHandler handler,
String filename)
Adds the attachment.
|
void |
addAttachment(File file)
Adds an attachment to the EmailMessage.
|
void |
addAttachment(File file,
String newFilename)
Adds an attachment to the EmailMessage.
|
MimeMultipart |
getMimeMultiPart()
Gets the MimeMultipart from the EmailAttachments.
|
public EmailMessageWithAttachments(EmailMessage emailMessage) throws MessagingException
emailMessage - The EmailMessage.MessagingException - if an error occurs.public void addAttachment(BodyPart part) throws MessagingException
part - The BodyPart to add to the EmailMessage.MessagingException - if an error occurs.public void addAttachment(byte[] content,
String filename,
String mimetype)
throws MessagingException
content - The bytearray with the content.filename - The new Filename for the attachment.mimetype - The mimetype.MessagingException - if an error occurs.public void addAttachment(DataHandler handler, String filename) throws MessagingException
handler - The DataHandler for the attachment.filename - The new Filename for the attachment.MessagingException - if an error occurs.public void addAttachment(File file) throws MessagingException
file - The file to add to the EmailMessage.MessagingException - if an error occurs.public void addAttachment(File file, String newFilename) throws MessagingException
file - The file to add to the EmailMessage.newFilename - The new Filename for the attachment.MessagingException - if an error occurs.public MimeMultipart getMimeMultiPart() throws MessagingException
MessagingException - if an error occurs.Copyright © 2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.