public static class MailService.Attachment
extends java.lang.Object
Constructor and Description |
---|
MailService.Attachment(java.lang.String fileName,
byte[] data)
Attachments are an optional part of messages, but if present, all
information about them must be provided.
|
MailService.Attachment(java.lang.String fileName,
byte[] data,
java.lang.String contentID)
Attachments are an optional part of messages, but if present, all
information about them must be provided.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentID() |
byte[] |
getData()
Gets the content of this attachment.
|
java.lang.String |
getFileName()
Gets the file name of this attachment.
|
public MailService.Attachment(java.lang.String fileName, byte[] data)
fileName
- The attachment must have a filename associated with it.
The extension on that filename must be present and white-listed, or
there will be a failure at send time.data
- An array with arbitrary byte content. The array must be
be present, but may be of zero length.java.lang.IllegalArgumentException
- if either fileName or data are missing.public MailService.Attachment(java.lang.String fileName, byte[] data, java.lang.String contentID)
fileName
- The attachment must have a filename associated with it.
The extension on that filename must be present and white-listed, or
there will be a failure at send time.data
- An array with arbitrary byte content. The array must be
be present, but may be of zero length.contentID
- The attachment's content ID. May be null.java.lang.IllegalArgumentException
- if either fileName or data are missing.public java.lang.String getFileName()
public byte[] getData()
public java.lang.String getContentID()