MailMessages
List, search, delete, and move IMAP messages. List and delete POP messages. And send messages with SMTP.
This schema is defined for all tables. Each table name will be a mailbox folder on the server.
Table Specific Information
You can use square brackets to escape the table names of mailbox folders.
Protocol Information
For more specifics on using this table with IMAP, POP, and SMTP, refer to Supported Mail Protocols.
Deprecation notice for Gmail users
From May 30, 2022, Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. There are alternatives that allow your continued use of our Email drivers to connect to your Google account, which is why Gmail-specific columns, pseudo-columns, and stored procedures are only getting deprecated. We recommend you move to our Gmail drivers that offer more secure methods of authentication.
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
Identifier of the mail message. |
Mailbox | String | True |
The current mailbox that the item is listed in. |
Subject | String | False |
The subject of the current message. |
From | String | True |
The sender email address of the current message. |
FullFrom | String | True |
The sender name and email address of the current message. |
To | String | False |
The semicolon-separated list of email addresses of the recipients. |
FullTo | String | False |
The semicolon-separated list of names and email addresses of the recipients. |
CC | String | False |
The semicolon-separated list of names and email addresses of the CCed recipients. |
BCC | String | False |
The semicolon-separated list of names and email addresses of the BCCed recipients (only applicable for sent mail). |
Date | String | True |
The date the current message was sent. |
MessageBody | String | False |
The message body. To set this field, specify a single Id in SELECT or set IncludeMessage to true. |
MessageDisplayText | String | False |
A text representation of an email's content. It displays either the HTML content or plain text, depending on the value provided by IsHTML connection property or pseudo-column. To set this field, specify a single Id in SELECT or set IncludeMessage to true. |
Attachments | String | False |
Semicolon-separated list of the attachment file names (with path if reading from a file) included in the message. |
AttachmentData | String | False |
Semicolon-separated list of the base-64-encoded attachment data included in the message. (You must still specify the file name in Attachments.) |
Size | Int | True |
The size in bytes of the current message. |
Flags | String | False |
The flags set on the current message. |
Labels | String | False |
The labels of the message, separated by spaces. Gmail treats labels as mailboxes. |
ThreadId | String | True |
The Gmail thread Id associated with the current message. Several messages may have the same thread Id. |
MsgId | String | True |
The message Id associated with the current message. For Gmail, this is a globally unique Id assigned by Google separate from the IMAP Id/UID. |
PartIds | String | True |
The Id of the message part. |
PartFilenames | String | True |
The file name of the message part. |
PartContentTypes | String | True |
The content type of the message part. |
PartSizes | String | True |
The size of the message part. |
Headers | String | True |
The message headers for the specified mail message. Available only if you specify a single Id in SELECT. |
AttachmentHeaders | String | True |
A newline-separated list of the headers associated with each attachment. |
ContentIds | String | True |
A semicolon-separated list of Content-Id headers for each attachment. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
ItemsPerPage | String |
Maximum number of items to return per page. The default value is 25. |
SearchCriteria | String |
The search criteria to use for the search operation (e.g., SENTSINCE dd-MMM-yyyy). The exact format of the search criteria is specified by the IMAP RFCs. The string consists of one or more search keys and their corresponding values (if any) separated by spaces; for example, 'SINCE 1-Feb-1994 NOT FROM Smith'. |
UIDMode | String |
If true, permanent message Ids are used instead of the default temporary Ids. The default value is FALSE. |
DownloadAttachments | String |
If true, attachments will be downloaded with the messages. Available only when specifying a single message Id or the Include Messages connection property is true. The default value is FALSE. |
AttachmentFolder | String |
Folder to download attachments to. If this is set, the AttachmentData column will not contain data: The data will be written to files. |
EMLFolder | String |
Folder to download the complete MIME message, which is saved as an EML file. If multiple messages are selected, subfolders will be created for each message. |
Overwrite | String |
Whether or not to overwrite attachments and EML files. The default value is FALSE. |
IsHTML | String |
Whether the email is HTML or plain text. The default value is TRUE. |
Importance | String |
Importance of the mail message. The allowed values are UNSPECIFIED, LOW, NORMAL, HIGH. The default value is UNSPECIFIED. |
Priority | String |
Priority of the mail message. The allowed values are UNSPECIFIED, NONURGENT, URGENT, NORMAL. The default value is UNSPECIFIED. |
Sensitivity | String |
Sensitivity of the mail message. The allowed values are UNSPECIFIED, PERSONAL, PRIVATE, COMPANYCONFIDENTIAL. The default value is UNSPECIFIED. |
DeliveryNotification | String |
Email address to send a delivery notification to. |
ReadReceipt | String |
Email address to send a read receipt to. |
ShowLabels | String |
Whether to show labels or not. The EmailService connection property must be set to Gmail. The default value is TRUE. |
ShowThreadId | String |
Whether to show the thread Id or not. The EmailService connection property must be set to Gmail. The default value is TRUE. |
ShowMsgId | String |
Whether to show the Msg Id or not. The EmailService connection property must be set to either Gmail or Outlook. The default value is TRUE. |
HasAttachments | String |
If true, only messages with attachments will be listed. If false, all messages will be listed. The EmailService connection property must be set to Gmail. |