InboundEmail Class
Represents an inbound email object.
The following are constructors for InboundEmail.
-
Creates a new instance of the
Messaging.InboundEmailclass.
Creates a new instance of the Messaging.InboundEmail class.
public InboundEmail()
The following are properties for InboundEmail.
-
A list of authentication results received with the email, if any.
-
A list of binary attachments received with the email, if any.
-
A list of carbon copy (CC) addresses, if any.
-
The email address that appears in the From field.
-
The name that appears in the From field, if any.
-
A list of the RFC 2822 headers in the email.
-
The HTML version of the email, if specified by the sender.
-
Indicates whether the HTML body text is truncated (
true) or not (false.) -
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.
-
The Message-ID—the incoming email’s unique identifier.
-
The plain text version of the email, if specified by the sender.
-
Indicates whether the plain body text is truncated (
true) or not (false.) -
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.
-
The email address that appears in the reply-to header.
-
The subject line of the email, if any.
-
A list of text attachments received with the email, if any.
-
The email address that appears in the
Tofield.
A list of authentication results received with the email, if any.
public InboundEmail.AuthenticationResult[] authenticationResults {get; set;}
Type: InboundEmail.AuthenticationResult[]
Examples of authentication results include dkim, dmarc, and spf.
A list of binary attachments received with the email, if any.
public InboundEmail.BinaryAttachment[] binaryAttachments {get; set;}
Type: InboundEmail.BinaryAttachment[]
Examples of binary attachments include image, audio, application, and video files.
A list of carbon copy (CC) addresses, if any.
public String[] ccAddresses {get; set;}
Type: String[]
The email address that appears in the From field.
public String fromAddress {get; set;}
Type: String
The name that appears in the From field, if any.
public String fromName {get; set;}
Type: String
A list of the RFC 2822 headers in the email.
public InboundEmail.Header[] headers {get; set;}
Type: InboundEmail.Header[]
The list of the RFC 2822 headers includes:
- Recieved from
- Custom headers
- Message-ID
- Date
The HTML version of the email, if specified by the sender.
public String htmlBody {get; set;}
Type: String
Indicates whether the HTML body text is truncated (true) or not (false.)
public Boolean htmlBodyIsTruncated {get; set;}
Type: Boolean
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.
public String inReplyTo {get; set;}
Type: String
The Message-ID—the incoming email’s unique identifier.
public String messageId {get; set;}
Type: String
The plain text version of the email, if specified by the sender.
public String plainTextBody {get; set;}
Type: String
Indicates whether the plain body text is truncated (true) or not (false.)
public Boolean plainTextBodyIsTruncated {get; set;}
Type: Boolean
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.
public String[] references {get; set;}
Type: String[]
The email address that appears in the reply-to header.
public String replyTo {get; set;}
Type: String
If there is no reply-to header, this field is identical to the fromAddress field.
The subject line of the email, if any.
public String subject {get; set;}
Type: String
A list of text attachments received with the email, if any.
public InboundEmail.TextAttachment[] textAttachments {get; set;}
Type: InboundEmail.TextAttachment[]
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-streamand a file name that ends with either a.vcfor.vcsextension. These are saved astext/x-vcardandtext/calendarMIME types, respectively.
The email address that appears in the To field.
public String[] toAddresses {get; set;}
Type: String[]