Table of Contents

TTMSFNCCloudGoogleGmail.GetMailsPromise Method

Lists the messages of the specified labels and returns a promise that resolves when all matching messages have been retrieved.

API unit family: TMSFNCCloudGoogleGmail Declaring type: TTMSFNCCloudGoogleGmail Inherited from: TTMSFNCCustomCloudGoogleGmail

Syntax

function GetMailsPromise(Labels: string = 'INBOX'; AMaxResults: Integer = 50; GetNextPage: Boolean = True): IPromise<TVoid>;

Parameters

Name Description
Labels Comma-separated label names to filter on, for example "INBOX".
AMaxResults Maximum number of messages to retrieve per page.
GetNextPage When True, automatically continues retrieving subsequent pages until all matching messages are loaded.

Returns

A promise that resolves when the messages have been retrieved.