Aspose.Email for C++ is a complete set of Email Processing APIs to create, read and manipulate emails from within C++ applications. It makes it easier to work with many Outlook email message formats such as MSG, EML, EMLX and MHT files without the need of installing Microsoft Outlook. It also enables you to manage message storage files - Personal Storage Files (PST), Offline Storage Files (OST) along with message sending and receiving capabilities. You can also read and extract Outlook PST file that can be saved to disk in MSG format.
Directory | Description |
---|---|
Examples | A collection of C++ examples that help you learn the product features. |
- Create a new email message with custom header.
- Save email messages in EML, MSG, and MHTML formats.
- Associate human-friendly names to email addresses for better accessibility.
- Have emails with HTML or Text body.
- Set alternate text of email messages for the Email Readers that cannot display HTML content.
- Fetch and display email header information.
- Save and convert email messages to the more than 12 supported file formats.
- Read email messages with TNEF attachments and modify the contents of the attachment.
- Add, remove, display and extract email attachments.
- Embed objects in emails, or extract objects & attachments.
- Create distribution list of multiple email contacts and save to storage in MSG format.
- Work with MAPI properties.
Microsoft Outlook: MSG, PST, OST, OFT
Other: EML, EMLX, MBOX, ICS, VCF, HTML, MHTML
Microsoft Outlook: OLM
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 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());
// create instance of IEWSClient class by giving credentials
System::SharedPtr<IEWSClient> client = GetExchangeEWSClient(GetExchangeTestUser());
// create 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);
Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License