@FullyTested public final class EmailMessageAttachment extends Object
JavaMailSessionBuilderFactory.INSTANCE| Modifier and Type | Field and Description |
|---|---|
EmailMessageAttachmentType |
attachmentType |
byte[] |
byteArr
Data for attachment
|
String |
mimeType
Ex(Text):
"text/plain; charset=utf-8" |
String |
nullableFileName
|
| Constructor and Description |
|---|
EmailMessageAttachment(EmailMessageAttachmentType attachmentType,
String nullableFileName,
String mimeType,
byte[] byteArr,
IsEmptyAllowed isEmptyAllowed)
Instead of direct access, API users should use
EmailMessageBuilder.builderForTextAttachment()
or EmailMessageBuilder.builderForBinaryAttachment(). |
public final EmailMessageAttachmentType attachmentType
@Nullable public String nullableFileName
null when attachmentType is EmailMessageAttachmentType.ATTACHMENT.
Always null when attachmentType is EmailMessageAttachmentType.INLINE.
Ex(Text): "log.txt"
Ex(Binary): "binary_data.bin"
public final String mimeType
"text/plain; charset=utf-8"
Ex(Binary): "application/octet-stream"
public final byte[] byteArr
public EmailMessageAttachment(EmailMessageAttachmentType attachmentType, @Nullable String nullableFileName, String mimeType, byte[] byteArr, IsEmptyAllowed isEmptyAllowed)
EmailMessageBuilder.builderForTextAttachment()
or EmailMessageBuilder.builderForBinaryAttachment().attachmentType - most users will expect EmailMessageAttachmentType.ATTACHMENTnullableFileName - when attachmentType is EmailMessageAttachmentType.ATTACHMENT,
must not be empty or all whitespace
attachmentType is EmailMessageAttachmentType.INLINE, always nullmimeType - MIME type for attachment
byteArr - array of bytes for the attachment
isEmptyAllowed is IsEmptyAllowed.NO, this array must not be empty.isEmptyAllowed - normally, this is IsEmptyAllowed.NOIllegalArgumentException - if attachmentType is EmailMessageAttachmentType.ATTACHMENT
and nullableFileName is empty or all whitespace
mimeType is empty or all whitespace
isEmptyAllowed is IsEmptyAllowed.NO and byteArr is emptyCopyright © 2013–2020. All rights reserved.