Export Folders or Messages to Outlook PST in C# ASP.NET

Email Processing in ASP.NET is a web application that demonstrates some of the great features of Aspose.Email for .NET. The application shows you how easy it is to work with Aspose.Email and how powerful the API is for working with emails from within .NET applications.

The initial release of Email Processing in ASP.NET showcases the following features:

  • Connect with your Microsoft Exchange Server or IMAP account.
  • List of your email folders and messages in a selected folder.
  • Export selected message to Microsoft Outlook PST file.
  • Export entire folder to Microsoft Outlook PST file.
  • The exported file can be downloaded on the fly.
Login - Email Processing in ASP.NET using Aspose.Email

Login - Email Processing in ASP.NET using Aspose.Email

The application demonstrates the following features provided by Aspose.Email:

  • Connect to Exchange Server.
  • Connect to IMAP server with or without SSL.
  • Get email folders list from Exchange Server.
  • Get email folders list from IMAP server.
  • Fetch messages from a selected folder.
  • Bind messages to a GridView control.
  • Get a single message from an Exchange Server using its unique URI.
  • Get a single message from an IMAP server using its unique ID.
  • Export messages to a Microsoft Outlook PST file.

Source Code

You can download the complete working source code from the following location:

Running the Email Processing in ASP.NET Web Application

The source code can be opened in Microsoft Visual Studio 2010 or higher. Once downloaded please follow the following instructions to run this application:

  1. Extract the ZIP file and open the solution file named Aspose.EmailProcessing.sln.
  2. Build the solution by pressing Ctrl+Shift+B or, from the top menu, select Build then Build Solution.
  3. Run the application by pressing Ctrl+F5 or, from the top menu, select Debug then Start without debugging.
    The application will be launched in your default browser.

Using the Email Processing in ASP.NET Web Application

Once you have successfully built and launched the application you will see a landing page with information about Aspose.Email for .NET. To get started:

  1. Click the Getting Started or Login button.
    You are presented with a login screen.
  2. Select your mail server, for example, Exchange or IMAP.
    Only relevant fields will be shown after you have selected a mail server.
  3. Fill in all the required fields and click Login.
  4. Your credentials will be verified and once done, you are taken to the mailbox page. On the left side, you can see all your email account folders.
  5. Click on any folder and its messages are fetched from the server and listed on the screen. It is safe to use any email account since we do not make any changes to the emails on the server.
  6. Select messages using the checkbox or export the whole folder using the PST Export button on the top right corner.

If you have any questions please feel free to contact us using our online forums.


Please check the video below to see it in action.