InboundEmail Class

Represents an inbound email object.

Namespace

Messaging

InboundEmail Constructors

The following are constructors for InboundEmail.

InboundEmail()

Creates a new instance of the Messaging.InboundEmail class.

Signature

public InboundEmail()

InboundEmail Properties

The following are properties for InboundEmail.

binaryAttachments

A list of binary attachments received with the email, if any.

Signature

public InboundEmail.BinaryAttachment[] binaryAttachments {get; set;}

Property Value

Type: InboundEmail.BinaryAttachment[]

Usage

Examples of binary attachments include image, audio, application, and video files.

ccAddresses

A list of carbon copy (CC) addresses, if any.

Signature

public String[] ccAddresses {get; set;}

Property Value

Type: String[]

fromAddress

The email address that appears in the From field.

Signature

public String fromAddress {get; set;}

Property Value

Type: String

fromName

The name that appears in the From field, if any.

Signature

public String fromName {get; set;}

Property Value

Type: String

headers

A list of the RFC 2822 headers in the email.

Signature

public InboundEmail.Header[] headers {get; set;}

Property Value

Type: InboundEmail.Header[]

Usage

The list of the RFC 2822 headers includes:

  • Recieved from
  • Custom headers
  • Message-ID
  • Date

htmlBody

The HTML version of the email, if specified by the sender.

Signature

public String htmlBody {get; set;}

Property Value

Type: String

htmlBodyIsTruncated

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

Signature

public Boolean htmlBodyIsTruncated {get; set;}

Property Value

Type: Boolean

inReplyTo

The In-Reply-To field of the incoming email. Identifies the email or emails to which this one is a reply (parent emails). Contains the parent email or emails' message-IDs.

Signature

public String inReplyTo {get; set;}

Property Value

Type: String

messageId

The Message-ID—the incoming email's unique identifier.

Signature

public String messageId {get; set;}

Property Value

Type: String

plainTextBody

The plain text version of the email, if specified by the sender.

Signature

public String plainTextBody {get; set;}

Property Value

Type: String

plainTextBodyIsTruncated

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

Signature

public Boolean plainTextBodyIsTruncated {get; set;}

Property Value

Type: Boolean

references

The References field of the incoming email. Identifies an email thread. Contains a list of the parent emails' References and message IDs, and possibly the In-Reply-To fields.

Signature

public String[] references {get; set;}

Property Value

Type: String[]

replyTo

The email address that appears in the reply-to header.

Signature

public String replyTo {get; set;}

Property Value

Type: String

Usage

If there is no reply-to header, this field is identical to the fromAddress field.

subject

The subject line of the email, if any.

Signature

public String subject {get; set;}

Property Value

Type: String

textAttachments

A list of text attachments received with the email, if any.

Signature

public InboundEmail.TextAttachment[] textAttachments {get; set;}

Property Value

Type: InboundEmail.TextAttachment[]

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.

toAddresses

The email address that appears in the To field.

Signature

public String[] toAddresses {get; set;}

Property Value

Type: String[]