In this article you will learn how to create Outlook email messages (MSG, EML, EMLX, MHTML) in C# and how to send them synchronously or asynchronously using .NET or .NET Core.

Email is the main channel for exchanging messages and sharing files like documents or images. Organizations often need to send notifications or documents to many recipients, and manually creating templates and sending each email is time‑consuming.
An Email Automation Service lets you create and send emails automatically. This guide shows how to generate Outlook‑format messages and automate sending them programmatically. After reading, you will be able to:
- create and save an email message in C#,
- create an email with HTML body in C#,
- create an email with a particular encoding in C#,
- send emails synchronously using SMTP in C#,
- send emails asynchronously using SMTP in C#,
- and send bulk emails in C#.
C# API to Create and Send Outlook Emails
To automate email creation and sending, we use Aspose.Email for .NET, a powerful email manipulation API. It supports Outlook formats such as MSG, EML/EMLX, and more. Download the API’s DLL or install it via NuGet Package Manager or the Package Manager Console.
PM> Install-Package Aspose.Email
After creating a C# (Console, ASP.NET, etc.) project and adding Aspose.Email for .NET, you can start building and sending emails.
Create an Outlook Email in C#
Aspose.Email provides the MailMessage class to create or modify Outlook messages. This class lets you set the subject, recipients, sender, body, add attachments, and save the message in formats like EML, MSG, or MHTML. Follow these steps:
- Create an instance of the MailMessage class.
- Set the message properties.
- Save the email using the MailMessage.Save() method.
The sample below creates and saves an email in C#.
Create an Outlook Email with HTML Body in C#
Use HTML tags to make the email body structured and visually rich. Set the MailMessage.HtmlBody property to include tables, images, lists, and other elements. The example below demonstrates how to add an HTML body.
C# Create an Outlook Email with a Particular Encoding
Specify the character encoding to ensure the email client renders the body correctly. Use the MailMessage.BodyEncoding property. The code sample shows how to set body encoding.
Send Outlook Emails Synchronously or Asynchronously in C#
After creating the email, you can send it synchronously or asynchronously. The SmtpClient class sends Outlook messages via SMTP. Follow these steps:
- Load or create a MailMessage instance.
- Create an SmtpClient object and configure host, username, password, and port.
- Call SmtpClient.Send for synchronous sending or SmtpClient.SendAsync for asynchronous sending.
Send an Outlook Email Synchronously in C#
Send an Outlook Email Asynchronously in C#
Send Bulk Emails in C#
Use the MailMessageCollection class to hold multiple messages and send them in bulk. The example below demonstrates bulk sending.
Aspose Email API for C# - Live Demos
Conclusion
You have learned how to create Outlook emails in C# and how to send them synchronously or asynchronously from .NET applications. Explore the documentation of Aspose.Email for .NET for more details.