Message

Email client message operations.

The most important part of the email client is Message management API.

Use this API to send, search, fetch, append, move, mark as read, or delete messages.

Append

Add email message to specified folder in email account. Returns ValueTOfString model. Requires:

request

Append email request. Type: ClientMessageAppendRequest.

AppendFile

Add email message from file to specified folder in email account. Returns ValueTOfString model. Requires:

request

AppendFile method request. Type: ClientMessageAppendFileRequest.

Delete

Delete message. Requires:

request

Delete message request. Type: ClientMessageDeleteRequest.

Fetch

Fetch message from email account. Returns MailMessageBase model. Requires:

request

Fetch method request. Type: ClientMessageFetchRequest.

FetchFile

Fetch message as file from email account. Returns a File. Requires:

request

FetchFile method request. Type: ClientMessageFetchFileRequest.

List

Get messages from folder, filtered by query.

The queryString should have the following view.

The example of a simple expression:

`'<Field name>' <Comparison operator> '<Field value>'`

where

  • <Field Name> - the name of a message field through which filtering is made,
  • <Comparison operator> - comparison operators, as their name implies, allow to compare message field and specified value,
  • <Field value> - value to be compared with a message field.

The number of simple expressions can make a compound one, ex.:

`(<Simple expression 1> & <Simple expression 2>) | <Simple expression 3>`

where

  • "&" - logical-AND operator,
  • "|" - logical-OR operator

At present the following values are allowed as a field name (<Field name>):

  • "To" - represents a TO field of message,
  • "Text" - represents string in the header or body of the message,
  • "Bcc" - represents a BCC field of message,
  • "Body" - represents a string in the body of message,
  • "Cc" - represents a CC field of message,
  • "From" - represents a From field of message,
  • "Subject" - represents a string in the subject of message,
  • "InternalDate" - represents an internal date of message,
  • "SentDate" - represents a sent date of message

Additionally, the following field names are allowed for IMAP-protocol:

  • "Answered" - represents an /Answered flag of message
  • "Seen" - represents a /Seen flag of message
  • "Flagged" - represents a /Flagged flag of message
  • "Draft" - represents a /Draft flag of message
  • "Deleted" - represents a Deleted/ flag of message
  • "Recent" - represents a Deleted/ flag of message
  • "MessageSize" - represents a size (in bytes) of message

Additionally, the following field names are allowed for Exchange:

  • "IsRead" - Indicates whether the message has been read
  • "HasAttachment" - Indicates whether or not the message has attachments
  • "IsSubmitted" - Indicates whether the message has been submitted to the Outbox
  • "ContentClass" - represents a content class of item

The field value (<Field value>) can take the following values:

  • For text fields - any string,
  • For date type fields - the string of "d-MMM-yyy" format, ex. "10-Feb-2009",
  • For flags (fields of boolean type) - either "True", or "False"

Example:

`(('From' Contains 'test@test.com' | 'Seen' = 'True') & 'SentDate' >= '12-May-2010')`

Returns MailMessageBaseList model. Requires:

request

List method request. Type: ClientMessageListRequest.

Move

Move message to another folder. Requires:

request

Move message request. Type: ClientMessageMoveRequest.

Send

Send an email specified by model in request. Requires:

request

Send email request. Type: ClientMessageSendRequest.

SendFile

Send an email file. Requires:

request

SendFile method request. Type: ClientMessageSendFileRequest.

SetIsRead

Mark message as read or unread. Requires:

request

Delete message request. Type: ClientMessageSetIsReadRequest.

More APIs