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