DirectMessageService V2
SOAP Sevice for sending and retrieving Direct messages. This page includes description abount service actions and data types.
SOAP Sevice for sending and retrieving Direct messages. This page includes description abount service actions and data types.
Function Name | Return Type | Parameters | Description |
---|---|---|---|
Send | APIResponse | SendRequest sendRequest | Send a direct message |
GetFolders | GetFoldersResponseType | Authentication auth String folderName boolean subscribedFolderOnly |
Get sub-folders in a folder |
SetFolderSubscribed | APIResponse | Authentication auth String[] folderNames boolean subscribed |
Set a list of folders to subscribed/unsubscribed |
GetMessageCount | GetCountResponse | Authentication auth String folderName |
Get the number of messages in a folder |
GetUnreadMessageCount | GetCountResponse | Authentication auth String folderName |
Get the number of unread messages in a folder |
GetDeletedMessageCount | GetCountResponse | Authentication auth String folderName |
Get the number of deleted messages in a folder |
GetMessageByIndex | GetMessageResponse | Authentication auth String folderName int index |
Get a message by using the message index. The index will change if some messages were deleted. For example: we have 4 messages in a folder
|
GetMessages | GetMessageResponse | Authentication auth String folderName |
Get all messages from a specified folder. |
GetUnreadMessages | GetMessageResponse | Authentication auth String folderName |
Get all unread messages in a folder |
GetMessagesByIndexes | GetMessageResponse | Authentication auth String folderName int[] indexes |
Get messages by using an array of message indexes |
GetMessagesByReceivedDate | GetMessageResponse | Authentication auth String folderName long beginTime long endTime |
Get messages filtered by the received date beginTime and endTime are Unix Time stamp: milliseconds since the Unix Epoch (1970-01-01T00:00:00Z ISO-8601) |
GetMessagesBySender | GetMessageResponse | Authentication auth String folderName String sender |
Get messages filtered by sender |
GetMessagesBySubject | GetMessageResponse | Authentication auth String folderName String subject |
Get messages filtered by subject |
GetMessagesByUID | GetMessageResponse | Authentication auth String folderName long[] uids |
Get messages by a list of Unique ID. The Unique ID is the received order of a message. It is unchangeable and unique in a folder. It is recommended to use UniqueID to identity each message. |
ListAuditFiles | GetAuditFilesResponse | Authentication auth | List All zipped Audit Files |
ZipUnArchivedMessages | GetAuditFilesResponse | Authentication auth | Compress Un-archived Messages as zip file |
DeleteAuditFile | GetAuditFilesResponse | Authentication auth String filename |
Delete a zipped audit file by file name |
GetAuditFile | GetAuditFilesResponse | Authentication auth String filename |
Get data of zipped audit file by file name |
CreateFolder | APIResponse | Authentication auth String folderName |
Create new folder. All folder names should start with "INBOX.". And below reserved folders can not be re-created or deleted:
|
MoveFolder | APIResponse | Authentication auth String folderName String newfolderName |
Rename a un-reserved folder. |
DeleteFolder | APIResponse | Authentication auth String folderName |
Recursively delete a un-reserved folder. All inside messages and sub-folders will be deleted also. |
CopyMessagesByUID | APIResponse | Authentication auth String folderName long[] uids String destFolderName |
Copy messages by UIDs |
MoveMessagesByUID | APIResponse | Authentication auth String folderName long[] uids String destFolderName |
Move messages by UIDs |
DeleteMessagesByUID | APIResponse | Authentication auth String folderName long[] uids Boolean deleteForever |
Delete messages by UIDs. If deleteForever is false, the messages will be moved to INBOX.Trash folder |
MarkMessagesAsReadByUID | APIResponse | Authentication auth String folderName long[] uids |
Mark messages as READ by UIDs |
MarkMessagesAsUnReadByUID | APIResponse | Authentication auth String folderName long[] uids |
Mark messages as UNREAD by UIDs |
GetUIDs | GetUIDResponseType | Authentication auth String folderName |
Get all UIDs in the folder. This function is useful to synchronize the folder's messages with server |
GetMessageMetadata | GetMessageResponse | Authentication auth String folderName |
Get all metadata in the folder |
Parameter | Description | |
---|---|---|
Authentication authentication | Authentication information | Required |
Message message | Message data | Required |
Parameter | Description | |
---|---|---|
String username | Direct email address | Required |
String password | User password | Required |
Parameter | Description | |
---|---|---|
String sender | From email address (same as username) | Required |
String subject | Email subject | |
String body | Email body | |
boolean htmlBody | true: html body, false: plain text body | Required |
Recipient[] recipients | An array of recipient objects | Required |
Attachment[] attachments | An array of attachment objects |
Parameter | Description | |
---|---|---|
String email | Recipient's email address | Required |
RecipientType type | Recipient type (TO|CC|BCC) | Required |
Parameter | Description | |
---|---|---|
byte[] content | Binary data of the attachment | Required |
String contentType | Content-Type of the attachment | Required |
String filename | Attachment file name | Required |
Parameter | Description | |
---|---|---|
boolean success | whether action is successful | |
int code | Error code (1: authentication failed, 2: address error, 3 and 4: other error | |
String errorMessage | Error message |
Parameter | Description | |
---|---|---|
String[] folders | The folders |
Parameter | Description | |
---|---|---|
int count | The count number |
Parameter | Description |
---|---|
MessageDetail[] messages | An array of searched messages |
Parameter | Description |
---|---|
AuditFile[] auditfiles | An array of audit files |
Parameter | Description |
---|---|
longuid | New parameter. The received order in a folder. Is uid is unique and will not be changed in a folder. |
int msgnum | The message number for this message |
String msgID | Message ID of this message. This method returns null if the corresponding header is not present. |
String folder | Get the folder from which this message was obtained. If this is a new message or nested message, this method returns null. |
boolean expunged | Whether the message is expunged |
String sender | From email address (same as username) (Inherited from APIResponse ) |
int size | The size of the content of this message in bytes. Return -1 if the size cannot be determined. |
Date sentDate | The Date the message was sent |
Date receivedDate | The Date the message was received |
String replyTo | Get the addresses to which replies should be directed. This will usually be the sender of the message, but some messages may direct replies to a different address. This method returns null if the corresponding header is not present. |
MessageHeader[] headers | An array of message header objects |
String subject | Email subject (Inherited from APIResponse ) |
String body | Email body (Inherited from APIResponse ) |
boolean htmlBody | true: html body, false: plain text body (Inherited from APIResponse ) |
Recipient[] recipients | An array of recipient objects (Inherited from APIResponse ) |
Attachment[] attachments | An array of attachment objects (Inherited from APIResponse ) |
Parameter | Description |
---|---|
String name | Name of this header line |
String value | Value of this header line |
Parameter | Description |
---|---|
byte[] content | Content in the audit file in byte[] type |
Date createdTime | Created date for the file |
String name | File name |
long size | Size of the file |
Parameter | Description |
---|---|
long[] uids | List of UIDs |