SQL examples for ODBC
The following SQL examples demonstrate common use cases for this connector. Select a scenario below to view the query syntax and parameters required to interact with Outlook Mail (Office 365).
- Call generic API request
- Delete a message by ID
- Delete multiple messages with search condition
- Download a message as .EML file
- Download an attachment to a file
- Download multiple attachments with search condition
- Download multiple messages as .EML files with search filters
- Read a mail folder by ID
- Read a message by ID
- Read an attachment by ID
- Read attachments for a message
- Read first N messages for a specified user
- Read groups
- Read mail folders
- Read messages for a specified user
- Read messages for the current user
- Read messages in a mail folder
- Read messages ordered by received time (ascending)
- Read messages ordered by received time (descending)
- Read messages ordered by sender name (ascending)
- Read messages ordered by sender name (descending)
- Read messages ordered by sent time (ascending)
- Read messages ordered by sent time (descending)
- Read messages that have attachments
- Read messages with subject starting with text
- Read unread messages
- Read users
- Send an email