Skip to content
| Marketplace
Sign in
Visual Studio>Controls>Aspose.Email for C++
Aspose.Email for C++

Aspose.Email for C++

Aspose Marketplace

|
86 clicks
| (0) | Free Trial
Create, edit & convert email files & message archives from within C++ applications without requiring Microsoft Outlook.
Get Started

C++ Email Parsing Library

Nuget Nuget

banner

Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

Aspose.Email for C++ enables your C++ applications to work with various Outlook® objects including messages, tasks, contacts, calendar, and journal items.

Email File Processing Features

  • Create a new email message with properties, such as From, To, Subject, and Body.
  • Save the email message in EML, MSG, and MHTML formats.
  • Associate human-friendly names to email addresses, to improve accessibility.
  • An email can have HTML as well as a text body.
  • Set the alternate text of email messages for the Email Readers that cannot display HTML content.
  • Fetch and display email header information and email body on screen.
  • Save and convert email messages to the supported file formats.
  • Read email messages with TNEF attachments and modify the contents of the attachment.
  • Check if the email message is regular or a bounced one.
  • Add, remove, display, and extract email attachments.
  • Embed objects in emails, the size of the attachment depends on the email server.
  • Extract embedded objects from email messages.
  • Export email to MHT with customized time zone.
  • Create distribution list of multiple email contacts and save to storage in MSG format.
  • Support to work with MAPI properties.
  • Add display or audio reminder to email calendar items.

Supported Read & Write Email Formats

Microsoft Outlook: MSG, PST, OST, OFT
Other: EML, EMLX, MBOX, ICS, VCF, HTML, MHTML

Read-Only Email Formats

Microsoft Outlook: OLM

Supported Email Protocols

  • SMTP
  • POP3
  • IMAP

Get Started

Are you ready to give Aspose.Email for C++ a try? Simply execute Install-Package Aspose.Email.Cpp from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.Email for C++ and want to upgrade the version, please execute Update-Package Aspose.Email.Cpp to get the latest version.

Create New Message & Save in EML & MSG Formats

Try executing the below code snippet to see how Aspose.Email for C++ performs in your environment. You may also check the GitHub Repository for other common usage scenarios.

The following code sample shows how to create a new email message and save it in EML & MSG formats using C++.

// create a new instance of MailMessage class
System::SharedPtr<MailMessage> message = System::MakeObject<MailMessage>();

// set subject of the message
message->set_Subject(u"New message created by Aspose.Email for .NET");

// set HTML body
message->set_IsBodyHtml(true);
message->set_HtmlBody(
    u"<b>This line is in bold.</b> <br/> <br/><font color=blue>This line is in blue color</font>");

// set sender information
message->set_From(u"from@domain.com");

// add TO recipients
message->get_To()->Add(u"to1@domain.com");
message->get_To()->Add(u"to2@domain.com");

// add CC recipients
message->get_CC()->Add(u"cc1@domain.com");
message->get_CC()->Add(u"cc2@domain.com");

// save message in EML, MSG and MHTML formats
message->Save(dir + u"output.eml", Aspose::Email::SaveOptions::get_DefaultEml());
message->Save(dir + u"output.msg", Aspose::Email::SaveOptions::get_DefaultMsgUnicode());

Send Email via Exchange EWS Client using C++

// create instance of IEWSClient class by giving credentials
System::SharedPtr<IEWSClient> client = GetExchangeEWSClient(GetExchangeTestUser());

// create an instance of type MailMessage
System::SharedPtr<MailMessage> msg = System::MakeObject<MailMessage>();
msg->set_From(MailAddress::to_MailAddress(u"sender@domain.com"));
msg->set_To(MailAddressCollection::to_MailAddressCollection(u"recipient@ domain.com "));
msg->set_Subject(u"Sending message from exchange server");
msg->set_HtmlBody(u"<h3>sending message from exchange server</h3>");

// send the message
client->Send(msg);

Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft