<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ZappySys, Author at ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/author/ppatel/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/author/ppatel/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 19 Mar 2026 23:07:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>ZappySys, Author at ZappySys Blog</title>
	<link>https://zappysys.com/blog/author/ppatel/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to download Outlook (Office 365) Emails as .EML or .MSG Files</title>
		<link>https://zappysys.com/blog/how-to-download-outlook-office-365-emails-as-eml-or-msg-files/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 19 Jun 2025 13:19:00 +0000</pubDate>
				<category><![CDATA[SSIS API Source]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=11380</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to download Outlook (Office 365) emails as .EML or .MSG files using ZappySys SSIS PowerPack without writing any code. We’ll leverage the power of Microsoft Graph API, which provides unified access to Microsoft 365 services like Outlook Mail, and integrate it seamlessly using the API Connector for [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-outlook-office-365-emails-as-eml-or-msg-files/">How to download Outlook (Office 365) Emails as .EML or .MSG Files</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img loading="lazy" decoding="async" class="alignleft" title="Outlook Mail (Office 365)" src="https://zappysys.com/blog/wp-content/uploads/2025/06/Outlook-28x281-1.png" alt="Outlook Mail (Office 365)" width="100" height="100" /> In this article, you will learn how to download Outlook (Office 365) emails as .EML or .MSG files using ZappySys SSIS PowerPack without writing any code. We’ll leverage the power of Microsoft Graph API, which provides unified access to Microsoft 365 services like Outlook Mail, and integrate it seamlessly using the <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/ssis">API Connector for SSIS Outlook Mail (Office 365)</a>, Web API Destination and other components. By the end, you’ll be able to automate the process of extracting emails and saving them to disk in standard email formats directly from your SSIS package.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, make sure the prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure the <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt">SSIS designer</a> is installed.</li>
 	<li>Download and install <a href="https://zappysys.com/products/ssis-powerpack/download/">ZappySys SSIS PowerPack</a>.</li>
</ol>
<strong>NOTE:</strong> If you are planning to deploy packages to a server and schedule their execution later, <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">read this article</a>.</div>
<h2>Step 1: Register an Application in Azure Portal</h2>
<p>To access Outlook emails via Microsoft Graph API, the first step is to register an application in the Azure Portal. This allows your SSIS package to authenticate securely and retrieve mail data from Office 365.<br />
Step by step info is available here Outlook Mail (Office 365) Connector Authentication section.</p>
<h3>User Credentials</h3>
<p>Use delegated access (User Credentials) whenever you want to let a signed-in user work with their own resources or resources they can access. Whether it&#8217;s an admin setting up policies for their entire organization or a user deleting an email in their inbox, all scenarios involving user actions should use delegated access.<br />
<b>Refer to this links for the detailed steps:</b> <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/help/authentication/usercreds/" target="_blank" rel="noopener">User Credentials [OAuth]</a></p>
<h3>Application Credentials</h3>
<p>Application-only access is broader and more powerful than delegated access (User Credentials), so you should only use app-only access where needed. Use it when:</p>
<ol>
<li>The application needs to run in an automated way, without user input (for example, a daily script that checks emails from certain contacts and sends automated responses).</li>
<li>The application needs to access resources belonging to multiple different users (for example, a backup or data loss prevention app might need to retrieve messages from many different chat channels, each with different participants).</li>
<li>You find yourself tempted to store credentials locally and allow the app to sign in &#8216;as&#8217; the user or admin.</li>
</ol>
<p><b>Refer to this links for the detailed steps:</b> <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/help/authentication/appcreds/ target=">Application Credentials [OAuth]</a></p>
<h2>Step 2: Download Outlook (Office 365) Emails as .EML Files using SSIS</h2>
<p>Now let’s look at some examples of how to access your Outlook emails using our easy-to-use Outlook Mail Connector in ZappySys SSIS PowerPack. This connector simplifies calling the Microsoft Graph API, so you can retrieve emails with just a few clicks.<br />
In this section we will learn how to configure and use Outlook Mail (Office 365) Connector in <a title="SSIS API Source" href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">API Source</a> to extract data from Outlook Mail (Office 365).</p>
<ol>
<li>Begin with opening Visual Studio and Create a New Project.</li>
<li>Select Integration Service Project and in new project window set the appropriate name and location for project.<br />
And click OK.</li>
<li>In the new SSIS project screen you will find the following:
<ol type="i">
<li>SSIS ToolBox on left side bar</li>
<li>Solution Explorer and Property Window on right bar</li>
<li>Control flow, data flow, event Handlers, Package Explorer in tab windows</li>
<li>Connection Manager Window in the bottom</li>
</ol>
<p><img loading="lazy" decoding="async" class="img-thumbnail" title="SSIS Project Screen" src="https://cdn.zappysys.com/api/images/zappysys-ssis-project-with-toolbox.png" alt="SSIS Project Screen" width="1059" height="675" /></p>
<div class="alert alert-warning">Note: If you don&#8217;t see ZappySys SSIS PowerPack Task or Components in SSIS Toolbox, please refer to <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004935754-I-don-t-see-PowerPack-components-in-SSIS-Toolbox">this help link</a>.</div>
</li>
<li>Now, Drag and Drop <b>SSIS Data Flow Task</b> from SSIS Toolbox. Double click on the <em>Data Flow Task</em> to see <em>Data Flow</em> designer.<img loading="lazy" decoding="async" class="img-thumbnail" title="SSIS Data Flow Task - Drag and Drop" src="https://cdn.zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" width="460" height="155" /></li>
<li>From the SSIS toolbox drag and <a title="SSIS API Source" href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">API Source</a> (Predefined Templates) on the data flow designer surface, and double click on it to edit it:<br />
<img loading="lazy" decoding="async" class="img-thumbnail" title="SSIS API Source (Predefined Templates) - Drag and Drop" src="https://cdn.zappysys.com/api/images/ssis-api-source-drag-and-drop.jpg" alt="SSIS API Source (Predefined Templates) - Drag and Drop" width="659" height="292" /></li>
<li>Select <strong>New Connection</strong> to create a new connection:<br />
<img loading="lazy" decoding="async" class="img-thumbnail img-thumbnail" title="API Source - New Connection" src="https://cdn.zappysys.com/api/images/ssis-api-source-new-connection.png" alt="API Source - New Connection" width="684" height="643" /></li>
<li>Use a preinstalled Outlook Mail (Office 365) Connector from <em>Popular Connector List</em> or press <em>Search Online</em> radio button to download Outlook Mail (Office 365) Connector. Once downloaded simply use it in the configuration:
<div id="attachment_11392" style="width: 722px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11392" class="size-full wp-image-11392" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector.png" alt="Outlook Mail (Office 365) Connector Selection" width="712" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector.png 712w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-connector-300x276.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-11392" class="wp-caption-text">Outlook Mail (Office 365) Connector Selection</p></div></li>
<li>Proceed with selecting the desired Authentication Type. Then select <em>API Base URL</em> (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed. You may press a link <strong>Steps to Configure</strong> which will help set certain parameters. More info is available in <a href="https://zappysys.com/api/integration-hub/outlook-mail-connector/help/authentication/UserCreds">Authentication section</a>.
<ol>
<li>User Credentials [OAuth]
<div id="attachment_11394" style="width: 806px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11394" class="size-full wp-image-11394" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication.png" alt="User Credentials [OAuth]" width="796" height="732" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication.png 796w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication-300x276.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-user-cred-authentication-768x706.png 768w" sizes="(max-width: 796px) 100vw, 796px" /></a><p id="caption-attachment-11394" class="wp-caption-text">User Credentials [OAuth]</p></div><b>OR</b></li>
<li>Application Credentials [OAuth]
<div id="attachment_11395" style="width: 809px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11395" class="size-full wp-image-11395" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication.png" alt="Application Credentials [OAuth]" width="799" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication.png 799w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication-300x276.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-app-cred-authentication-768x706.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></a><p id="caption-attachment-11395" class="wp-caption-text">Application Credentials [OAuth]</p></div></li>
</ol>
</li>
<li>Select the <b>Get Messsages</b> endpoint, change/pass the properties values, and click on <strong>Preview Data</strong> button to make the API call.
<div id="attachment_11397" style="width: 756px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11397" class="size-full wp-image-11397" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages.png" alt="API Source - Get Messages Endpoint" width="746" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages.png 746w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-select-outlook-mail-get-messages-300x242.png 300w" sizes="(max-width: 746px) 100vw, 746px" /></a><p id="caption-attachment-11397" class="wp-caption-text">API Source &#8211; Get Messages Endpoint</p></div></li>
<li>That’s it — click <b>OK</b> and you&#8217;re done! In just a few clicks, you’ve successfully configured a connection to <b>Outlook Mail (Office 365)</b> using the <b>Outlook Mail Connector</b>.</li>
<li>Now let&#8217;s move to the next step — retrieving the full email content.<br />
You’ll use the <strong>Web API Destination</strong> component to make the <strong>Get MIME content</strong> API call. Within this task, you can dynamically pass the <strong>Message ID</strong> to fetch each email’s raw <code>.EML</code> content from Outlook (Office 365).<br />
For more details, refer to the official Microsoft documentation: <a href="https://learn.microsoft.com/en-us/graph/api/message-get?view=graph-rest-1.0&amp;tabs=http#example-4-get-mime-content" target="_blank" rel="noopener">Get Outlook Mail MIME content</a></li>
<li>Drag and drop the <b>Web API Destination</b> component from the SSIS Toolbox onto your Data Flow.<br />
Double-click to open it, then configure as follows and create a new OAuth Connection if needed:<strong>URL:</strong></p>
<blockquote><p>https://graph.microsoft.com/v1.0/me/messages/&lt;%Id%&gt;/$value</p></blockquote>
<p>The &lt;%Id%&gt; placeholder is dynamically replaced by SSIS at runtime with the actual Message ID, allowing the Web API Destination to download each email’s .EML content individually.</p>
<div id="attachment_11407" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11407" class="size-large wp-image-11407" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-1024x748.png" alt="Get MIME content’ API call using the Web API Destination" width="720" height="526" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-1024x748.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-300x219.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message-768x561.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-web-api-destination-mail-get-mime-message.png 1074w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11407" class="wp-caption-text">Get MIME content’ API call using the Web API Destination</p></div></li>
<li>You’ll also need to create the OAuth connection using the same credentials.<br />
On the Advanced tab, make sure to set the Redirect URL correctly.For detailed steps, refer to this guide:<br />
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">How to set up OAuth 2.0 in SSIS</a></p>
<div id="attachment_11408" style="width: 711px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11408" class="size-full wp-image-11408" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection.png" alt="Outlook Mail OAuth 2.0 Connection" width="701" height="763" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection.png 701w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-outlook-mail-oauth-connection-276x300.png 276w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-11408" class="wp-caption-text">Outlook Mail OAuth 2.0 Connection</p></div></li>
<li>Next, add a Derived Column transformation to create a new column that defines the file path for saving the <strong>.EML</strong> file.<br />
In this example, we’ll use the Message ID to generate a unique file name for each email:Expression:</p>
<blockquote><p>(DT_WSTR,1000)&#8221;E:\\zsTemp\\&#8221; + [Id] + &#8220;.eml&#8221;</p></blockquote>
<div id="attachment_11409" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11409" class="size-large wp-image-11409" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-1024x626.png" alt="Derived Column - Dynamic File Path" width="720" height="440" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-1024x626.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename-768x470.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-derived-column-add-filename.png 1154w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11409" class="wp-caption-text">Derived Column &#8211; Dynamic File Path</p></div></li>
<li>Now, add an <strong>Export Column</strong> transformation to save the email content to a file.
<ul>
<li><strong>Extract Column:</strong> set to <code>ResponseText</code> (this holds the email content from Web API Destination)</li>
<li><strong>File Path Column:</strong> set to the column you created in the <strong>Derived Column</strong> step (e.g., <code>FilePath</code>)</li>
<li>Enable <strong>Force Truncate</strong> and <strong>Write Byte-Order Mark</strong> options</li>
</ul>
<div id="attachment_11411" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11411" class="size-large wp-image-11411" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-1024x574.png" alt="Export Column - write the email content to a file on disk." width="720" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-1024x574.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-300x168.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file-768x431.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-export-column-save-to-file.png 1216w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11411" class="wp-caption-text">Export Column &#8211; write the email content to a file on disk.</p></div></li>
<li><b>Set File Encoding to UTF-8 (Optional)</b><br />
Next, go to the <strong>Control Flow</strong> and use the <strong>Advanced File System Task</strong> to convert the downloaded <code>.eml</code> file’s encoding to <strong>UTF-8</strong>.<br />
This step is optional — I had to apply it on my system because the files weren’t opening correctly due to a non-UTF-8 encoding.<br />
If you encounter a similar issue, follow this step to ensure proper compatibility with email clients.</p>
<div id="attachment_11413" style="width: 889px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11413" class="size-full wp-image-11413" src="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding.png" alt="Advanced File System Task - Change Encoding" width="879" height="663" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding.png 879w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding-300x226.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/ssis-advanced-file-system-task-change-encoding-768x579.png 768w" sizes="(max-width: 879px) 100vw, 879px" /></a><p id="caption-attachment-11413" class="wp-caption-text">Advanced File System Task &#8211; Change Encoding</p></div></li>
<li><strong>That’s it!</strong> The process will now automatically download your Outlook messages to your local system as <code>.EML</code> files.
<div id="attachment_11414" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11414" class="size-large wp-image-11414" src="https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-1024x450.png" alt="Outlook .eml file’s" width="720" height="316" srcset="https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-1024x450.png 1024w, https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-300x132.png 300w, https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files-768x338.png 768w, https://zappysys.com/blog/wp-content/uploads/2025/06/outlook-mail-files.png 1044w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-11414" class="wp-caption-text">Outlook .eml file’s</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>Using <strong>ZappySys SSIS PowerPack</strong> and Microsoft Graph API, you can easily automate the download of Outlook (Office 365) emails in <code>.EML</code> format — all within SSIS and without writing any code.<br />
This approach is ideal for archiving, compliance, or integrating email content into downstream systems.<br />
With a few simple components and steps, your email extraction workflow can be up and running in minutes.</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-outlook-office-365-emails-as-eml-or-msg-files/">How to download Outlook (Office 365) Emails as .EML or .MSG Files</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
