public static class MailService.AttachmentConstructors
Attachment(String fileName, byte[] data)
public Attachment(String fileName, byte[] data)Attachments are an optional part of messages, but if present, all information about them must be provided.
| Parameters | |
|---|---|
| Name | Description | 
| fileName | StringThe attachment must have a filename associated with it. The extension on that filename must be present and not blocked, or there will be a failure at send time. | 
| data | byte[]An array with arbitrary byte content. The array must be be present, but may be of zero length. | 
Attachment(String fileName, byte[] data, @Nullable String contentID)
public Attachment(String fileName, byte[] data, @Nullable String contentID)Attachments are an optional part of messages, but if present, all information about them must be provided.
| Parameters | |
|---|---|
| Name | Description | 
| fileName | StringThe attachment must have a filename associated with it. The extension on that filename must be present and blocked, or there will be a failure at send time. | 
| data | byte[]An array with arbitrary byte content. The array must be be present, but may be of zero length. | 
| contentID | Nullable StringThe attachment's content ID. May be null. | 
Methods
getContentID()
public @Nullable String getContentID()| Returns | |
|---|---|
| Type | Description | 
| Nullable String | |
getData()
public byte[] getData()Gets the content of this attachment.
| Returns | |
|---|---|
| Type | Description | 
| byte[] | The raw data of this attachment. | 
getFileName()
public String getFileName()Gets the file name of this attachment.
| Returns | |
|---|---|
| Type | Description | 
| String | The file name of this attachment. |