Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titlelistAllMails
<gmail.listAllMails>
	<includeSpamTrash>{$ctx:includeSpamTrash}</includeSpamTrash>
    <labelIds>{$ctx:labelIds}</labelIds>
    <maxResults>{$ctx:maxResults}</maxResults>
    <pageToken>{$ctx:pageToken}</pageToken>
    <q>{$ctx:q}</q>
</gmail.listAllMails> 
Properties
  • includeSpamTrash: Includes messages from SPAM and TRASH in the results. (Default: false).
  • labelIds: Only returns messages with labels that match all of the specified label IDs.
  • maxResults: Maximum number of messages to return.
  • pageToken: Page token to retrieve a specific page of results in the list.
  • q: Only returns messages matching the specified query. Supports the same query format as the Gmail search box.

...

Code Block
languagexml
titlemodifyExistingMessages
<gmail.modifyExistingThreads>
	<id>{$ctx:id}</id>
    <addLabelIds>{$ctx:addLabelIds}</addLabelIds>
    <removeLabelIds>{$ctx:removeLabelIds}</removeLabelIds>
</gmail.modifyExistingThreads>
Properties
  • id: The ID of the message to modify.
  • addLabelIds: A list of IDs of labels to add to this message.
  • removeLabelIds: A list of IDs of labels to remove from this message.

...

Code Block
languagexml
titletrashMessages
<gmail.trashMessages>
	<id>{$ctx:id}</id>
</gmail.trashMessages>
Properties
  • id: The ID of the message to trash.

...

Code Block
languagexml
titleunTrashMessages
<gmail.unTrashMessages>
	<id>{$ctx:id}</id>
</gmail.unTrashMessages> 
Properties
  • id: The ID of the message to untrash

...

Code Block
languagexml
titledeleteMessages
<gmail.deleteMessages>
	<id>{$ctx:id}</id>
</gmail.deleteMessages> 
Properties
  • id: The ID of the message to delete

...

Code Block
languagexml
titlelistAllMailssendMailWithAttachment
<gmail.sendMailWithAttachment>
    <subject>{$ctx:subject}</subject>
    <to>{$ctx:to}</to>
    <cc>{$ctx:cc}</cc>
    <bcc>{$ctx:bcc}</bcc>
    <messageBody>{$ctx:messageBody}</messageBody>
    <fileName>{$ctx:fileName}</fileName>
    <filePath>{$ctx:filePath}</filePath>
</gmail.sendMailWithAttachment>
Properties
  • toRecipientsto: The email addresses of the recipients of the message.
  • subject: Subject of the message.
  • ccRecipientscc: The email addresses of recipients who will receive a copy of this message.
  • bccRecipientsbcc: The email addresses of recipients who will privately receive a copy of this message (their email addresses will be hidden).
  • fileName: A comma-seperated list of file names of the attachments you want to include with the message.
  • filePath: A comma-seperated list of file paths of the attachments you want to include with the message.
  • messageBody: Content of the message.

...

Code Block
languagexml
titleSample Request for listAllMailssendMailWithAttachment
{
  "subject":"WSO2 Gmail Connector",
  "to":"hmrajas1990@gmail.com",
  "cc":"hmrajas1990@gmail.com",
  "bcc":"rajjaz@wso2.com",
  "messageBody":"Welcome to WSO2 ESB Gmail Connector!!!!!",
  "fileName":"/home/rajjaz/Documents/ESB/esb-connector-gmail/src/test/resources/artifacts/ESB/config/smile.png",
  "filePath":"smile.png"
}

...