MailMessage Module Introduction
The MailMessage module provides the MailMessage class for representing represents an email message. This module is used by the SmtpClient and Pop3Client modules.
To use this module, use "%requires MailMessage" in your code. See the SmtpClient and Pop3Client modules for examples of Qore code using this module
All the public symbols in the module are defined in the MailMessage namespace
The main classes are:
- Example:
//!/usr/bin/env qore
%requires MailMessage
MailMessage::Message msg("Me, Myself, and I <me@email.com>", "My Subject");
msg.setBody("hello world!");
msg.addTO("My Best Friend <you@friend.com>");
MailMessage Release Notes
MailMessage 1.5
- Enhanced attachment handling:
- Added
content_id field to PartInfo hashdecl
- Improved filename validation and sanitization (issue 5164)
- Added multipart type detection and helper methods:
- Added new fields to MailMessageInfo hashdecl:
is_multipart, multipart_type, is_signed, is_encrypted, is_digest
- Now requires Mime module version 1.7 or later (issue 5162)
MailMessage 1.4
- Added the
MailMessage::MailMessage::getInfo() "MailMessage::getInfo()" method
MailMessage 1.3.3
MailMessage 1.3.2
- fixed message serialization for SMTP handling; default to base64 encoding for attachments and if the message body has a single
"." character on a line; convert any single "." characters on a line to two ".." characters if using inly quoted printable encoding (issue issue 3275)
MailMessage 1.3.1
- fixed
MailMessage::Message::addBody() "Message::addBody()" with no body present (issue issue 2360)
MailMessage 1.3
- added support for complex types
MailMessage 1.2.1
MailMessage 1.2
MailMessage 1.1
- added the
MailMessage::Message::serialize() "Message::serialize()" method
MailMessage 1.0.4
- minor doc corrections and non-functional code changes
MailMessage 1.0.3
- requires Mime module 1.3 for the MultiPartMessage::parseBody() method
- fixed a bug where the part/attachment content-type was set to the content-type of the message
- try to get the filename of attachments from the content-type header if not set in the content-disposition header
- message parts that themselves have parts are now supported
- fixed recognizing mime messages with additional text after the version number (ex: "Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))")
MailMessage 1.0.2
- use
"<string>::isDataPrintableAscii()" to determine which mail headers need encoding
MailMessage 1.0.1
- fixed a bug encoding mail headers where mail headers requiring encoding were not encoded and those not requiring encoding were encoded with Q encoding
MailMessage 1.0
- moved from the SmtpClient module to an independent module to also support the Pop3Client class