Reference

Endpoint Get Message by Id (Single) - Output binary data (EML RFC 822 / MIME)


Name

get_message_binary

Description

Gets a single message binary data as *.EML File Content (RFC 822 / MIME) for a specified Message Id / mailbox / folder

Parameters

Parameter Required Options
Name: MessageId

Label: MessageId

YES
Name: UserId

Label: User ID or Email

The Microsoft Mail user ID GUID or email address for the account to read messages from. (Examples: '4ff54a77-9c09-4274-958f-83bdc0a53900' or 'first.last@domain.com')
YES
Name: MailFolderId

Label: MailFolderId

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
MessageId DT_STR varchar(255) 255
StatusCode DT_I4 int
Data DT_IMAGE varbinary(0)
ErrorMessage DT_STR varchar(4000) 4000
UserId DT_STR varchar(255) 255
MailFolderId DT_STR varchar(255) 255
If the column you are looking for is missing, consider customizing Outlook Mail (Office 365) Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use Outlook Mail (Office 365) Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - Outlook Mail (Office 365)
Outlook Mail Connector (Office 365) can be used to integrate Office 365 Outlook Mail API in your App / BI Tools. You can download attachment, read / search Emails, Users, MailFolders, Send email and more.
Outlook Mail (Office 365)
Get Message by Id (Single) - Output binary data (EML RFC 822 / MIME)
Required Parameters
MessageId Fill-in the parameter...
User ID or Email Fill-in the parameter...
Optional Parameters
MailFolderId
SaveContentAsBinary True
Continue processing on 404 error True
EnableCustomReplace True
SearchFor ^\s*$--regex
ReplaceWith {}
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Outlook Mail (Office 365)
Outlook Mail Connector (Office 365) can be used to integrate Office 365 Outlook Mail API in your App / BI Tools. You can download attachment, read / search Emails, Users, MailFolders, Send email and more.
Outlook Mail (Office 365)
Get Message by Id (Single) - Output binary data (EML RFC 822 / MIME)
Required Parameters
MessageId Fill-in the parameter...
User ID or Email Fill-in the parameter...
Optional Parameters
MailFolderId
SaveContentAsBinary True
Continue processing on 404 error True
EnableCustomReplace True
SearchFor ^\s*$--regex
ReplaceWith {}
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Get message by id (single) - output binary data

SELECT * FROM get_message_binary
WITH
(
    "MessageId" = 'abcd-1234-messageid',
    "UserId" = 'abcd-1234-userid'
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Get message by id (single) - output binary data

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_message_binary
WITH
(
    "MessageId" = ''abcd-1234-messageid'',
    "UserId" = ''abcd-1234-userid''
)';

EXEC (@MyQuery) AT [LS_TO_OUTLOOK_MAIL_OFFICE_365_IN_GATEWAY];