Newer Version Available

This content describes an older version of this product. View Latest

InboundEmail.TextAttachment Class

An InboundEmail object stores text attachments in an InboundEmail.TextAttachment object.

Namespace

Messaging

Usage

The text attachments can be any of the following:

  • Attachments with a Multipurpose Internet Mail Extension (MIME) type of text
  • Attachments with a MIME type of application/octet-stream and a file name that ends with either a .vcf or .vcs extension. These are saved as text/x-vcard and text/calendar MIME types, respectively.

InboundEmail.TextAttachment Constructors

The following are constructors for InboundEmail.TextAttachment.

InboundEmail.TextAttachment()

Creates a new instance of the Messaging.InboundEmail.TextAttachment class.

Signature

public InboundEmail.TextAttachment()

InboundEmail.TextAttachment Properties

The following are properties for InboundEmail.TextAttachment.

body

The body of the attachment.

Signature

public String body {get; set;}

Property Value

Type: String

bodyIsTruncated

Indicates whether the attachment body text is truncated (true) or not (false.)

Signature

public Boolean bodyIsTruncated {get; set;}

Property Value

Type: Boolean

charset

The original character set of the body field. The body is re-encoded as UTF-8 as input to the Apex method.

Signature

public String charset {get; set;}

Property Value

Type: String

fileName

The name of the attached file.

Signature

public String fileName {get; set;}

Property Value

Type: String

headers

Any header values associated with the attachment. Examples of header names include Content-Type, Content-Transfer-Encoding, and Content-ID.

Signature

public List<Messaging.InboundEmail.Header> headers {get; set;}

Property Value

Type: List<Messaging.InboundEmail.Header>

mimeTypeSubType

The primary and sub MIME-type.

Signature

public String mimeTypeSubType {get; set;}

Property Value

Type: String