Magidoc

getEmails
Query

Get emails from the user's mailbox with support for pagination. If there are more emails available beyond the current page, the response will include a "nextPageToken". To retrieve the next batch of results, call "getEmails" again using the same filters and pass the returned "nextPageToken".

Arguments

#

from

The email address of the sender.

to

The email address of the recipient.

cc

The email address of the carbon copy recipient.

bcc

The email address of the blind carbon copy recipient.

subject

The subject of the email.

searchQuery

Plain search string passed to the provider. Use this parameter only if you need to use a complex search query that cannot be expressed using the other parameters. IMPORTANT: This parameter is passed verbatim to Gmail. Prefer using the structured parameters (from, to, cc, bcc, subject) instead, as they automatically handle proper quoting for multi-word values.

after

The date after which the email was sent. For Microsoft, if after is provided, before must be provided as well.

before

The date before which the email was sent. For Microsoft, if before is provided, after must be provided as well.

maxResults = 50

The maximum number of emails to return. The default is 50. The maximum is 100.

searchInboxOnly

If true, only emails in the inbox will be returned.

searchSentOnly

If true, only emails in the sent folder will be returned.

nextPageToken

Pagination token returned in the previous "getEmails" response. Pass this token to retrieve the next page of results. If omitted, the first page will be returned.

Response

#

Returns GetEmailsResponse !.

Example

#