Aspose.Email for CPP 21.3 Release Notes

Aspose.Email for C++ 21.3 is based on Aspose.Email for .NET 21.3.

New Enhancements

Getting information about bulk messages sent

When you send messages in bulk, you can get an information about the number of successfully sent messages and moreover, it is possible to get a list of these messages. A new SucceededSending event was added to SmtpClient for this purpose.

Code sample:

System::SharedPtr<SmtpClient> client = TestUtil::CreateSmtpClient(host, SecurityOptions::Auto);
int messageCount = 0;

auto eventHandler = [&](System::SharedPtr<System::Object> sender, System::SharedPtr<MailMessageEventArgs> evntArgs) -> void
    System::Console::WriteLine(u"The message '{0}' was successfully sent.", evntArgs->get_Message()->get_Subject());

System::Console::Console::WriteLine(u"{0} messages were successfully sent.", messageCount);

LinkedResource.ContentDisposition property

A LinkedResource.ContentDisposition property has been added to get Content-Disposition header.

Code sample:

System::SharedPtr<MailMessage> eml = MailMessage::Load(fileName);

The full code of the example can be found at Aspose Email for C++ GitHub examples repository.