Mail_Mime
pear.php.net
Mail_Mime provides classes to create MIME messages.
Mail_Mime provides classes to deal with the creation and manipulation of MIME messages. It allows people to create e-mail messages consisting of: * Text Parts * HTML Parts * Inline HTML Images * Attachments * Attached messages

It supports big messages, base64 and quoted-printable encodings and non-ASCII characters in filenames, subjects, recipients, etc. encoded using RFC2047 and/or RFC2231.
Cipriano Groenendal
cipri
cipri@php.net no
Aleksander Machniak
alec
alec@php.net yes
2015-09-13
12:44:43
1.10.0
1.10.0
stable
stable
BSD Style
* Add possibility to add externally created Mail_mimePart objects as attachments [alec] * Add possibility to set preamble text for multipart messages [alec]
5.0.0
1.6.0
1.0
1.0
stable
stable
2001-12-28
PHP
This is the initial release of the Mime_Mail package.
1.1
1.1
stable
stable
2002-04-03
PHP
This is a maintenance release with various bugfixes and minor enhancements.
1.2
1.2
stable
stable
2002-07-14
PHP
* Added header encoding * Altered mimePart to put boundary parameter on newline * Changed addFrom() to setFrom() * Added setSubject() * Made mimePart inherit crlf setting from mime
1.2.1
1.2.1
stable
stable
2002-07-27
PHP
* License change * Applied a few changes From Ilia Alshanetsky
1.3.0RC1
1.3.0RC1
beta
beta
2005-03-20
PHP
* First release in over 2.5 years (!) * MANY bugfixes (see the bugtracker) * added a few tests
1.3.0
1.3.0
stable
stable
2005-04-01
PHP
* First (stable) release in over 2.5 years (!) * MANY bugfixes (see the bugtracker) * added a few tests * one small fix after RC1 (bug #3940)
1.3.1
1.3.1
stable
stable
2005-07-13
PHP
1.4.0a1
1.3.1
alpha
stable
2007-03-08
bsd style
* Changed License to BSD Style license, as that's what the code was since the beginning [cipri] * Fix Bug #30: Mail_Mime: _encodeHeaders is not RFC-2047 compliant. [cipri] * Fix Bug #3513: support of RFC2231 in header fields. [cipri] * Fix Bug #4696: addAttachment crash [cipri] * Fix Bug #5333: Only variables should be returned by reference; triggers notices since php 4.4.0 [cipri] * Fix Bug #7561: Mail_mimePart::_quotedPrintableEncode() misbehavior with mbstring overload [cipri] * Fix Bug #8223: Incorrectly encoded quoted-printable headers [cipri] * Fix Bug #8386: HTML body not correctly encoded if attachments present [cipri] * Fix Bug #8541: mimePart.php line delimiter is \r [cipri] * Fix Bug #9347: Notices about references [cweiske] * Fix Bug #9558: Broken multiline headers [cipri] * Fix Bug #9956: Notices being thrown [cipri] * Fix Bug #9976: Subject encoded twice [cipri] * Implement Feature #2952: Mail_mime::headers() saves extra headers [cipri] * Implement Feature #3636: Allow specification of charsets and encoding [cipri] * Implement Feature #4057: Mail_Mime: Add name parameter for Content-Type [cipri] * Implement Feature #4504: addHTMLImage does not work in cases when filename contains a path [cipri] * Implement Feature #5837: Mail_Mime: Build message for Net_SMTP [cipri] * Implement Feature #5934: Mail_Mime: choice for content disposition [cipri] * Implement Feature #6568: Mail_Mime: inline images referenced in CSS definitions not replaced. [cipri]
1.4.0a2
1.3.1
alpha
stable
2007-04-05
bsd style
* Fix Bug #9722: _quotedPrintableEncode does not encode dot at start of line on Windows platform [cipri] * Fix Bug #9725: multipart/related & alternative wrong order [cipri] * Fix Bug #10146: mbstring fails to recognize encodings. [cipri] * Fix Bug #10158: Inline images not displayed on Mozilla Thunderbird [cipri] * Fix Bug #10298: Mail_mime, double Quotes and Specialchars in from and to Adress [cipri] * Fix Bug #10306: Strings with Double Quotes get encoded wrongly [cipri] * Fix Bug #10596: Incorrect handling of text and html '0' bodies [cipri]
1.4.0a3
1.3.1
alpha
stable
2007-04-05
bsd style
* Fix Bug #10298: Mail_mime, double Quotes and Specialchars in from and to Adress [cipri] * Fix Bug #10306: Strings with Double Quotes get encoded wrongly [cipri]
1.4.0RC1
1.3.1
beta
stable
2007-04-12
bsd style
* Fix Bug #10232: Gmail creates double line break when \r\n is used [cipri]
1.4.0RC2
1.3.1
beta
stable
2007-04-22
bsd style
* Fix Bug #10791: Unit tests fail [cipri] * Fix Bug #10792: No unit tests for recently fixed bugs [cipri] * Fix Bug #10793: Long headers don't get wrapped since fix for Bug #10298 [cipri]
1.4.0RC3
1.3.1
beta
stable
2007-04-24
bsd style
* Fix Bug #10816: Unwanted linebreak at the end of output [cipri]
1.4.0RC4
1.3.1
beta
stable
2007-04-28
bsd style
* Fix Bug #3513: support of RFC2231 in header fields. [cipri] * Fix Bug #10838: bad use of MIME encoding in header. [cipri]
1.4.0
1.3.1
stable
stable
2007-05-05
BSD Style
Release notes: * No more notices in PHP 5 /4.4.0. * Improved inline HTML image function. * Improved header encoding with foreign charsets. * Improved long header rendering. * More control over used Charsets and encoding schemes. * More configurable attachments and inline images. * Full RFC 2047 Support * Full RFC 2231 Support * Unit-tests

Fixed bugs: * Fix Bug #30: Mail_Mime: _encodeHeaders is not RFC-2047 compliant. [cipri] * Fix Bug #3513: support of RFC2231 in header fields. [cipri] * Fix Bug #4696: addAttachment crash [cipri] * Fix Bug #5333: Only variables should be returned by reference; triggers notices since php 4.4.0 [cipri] * Fix Bug #5400: Do not return function reference [cipri] * Fix Bug #5710: Little reference bugs [cipri] * Fix Bug #5890: Only variable references should be returned by reference [cipri] * Fix Bug #6260: Just a notice with PHP5 [cipri] * Fix Bug #6261: php 5.1.1 upgrade [cipri] * Fix Bug #6663: Notice about reference passing [cipri] * Fix Bug #7561: Mail_mimePart::_quotedPrintableEncode() misbehavior with mbstring overload [cipri] * Fix Bug #7713: PHP5 Notice: Only variable references should be returned by reference [cipri] * Fix Bug #8223: Incorrectly encoded quoted-printable headers [cipri] * Fix Bug #8386: HTML body not correctly encoded if attachments present [cipri] * Fix Bug #8541: mimePart.php line delimiter is \r [cipri] * Fix Bug #8812: user header updates overwritten [cipri] * Fix Bug #9347: Notices about references [cweiske] * Fix Bug #9558: Broken multiline headers [cipri] * Fix Bug #9722: _quotedPrintableEncode does not encode dot at start of line on Windows platform [cipri] * Fix Bug #9725: multipart/related & alternative wrong order [cipri] * Fix Bug #9956: Notices being thrown [cipri] * Fix Bug #9976: Subject encoded twice [cipri] * Fix Bug #10146: mbstring fails to recognize encodings. [cipri] * Fix Bug #10158: Inline images not displayed on Mozilla Thunderbird [cipri] * Fix Bug #10232: Gmail creates double line break when \r\n is used [cipri] * Fix Bug #10298: Mail_mime, double Quotes and Specialchars in from and to Adress [cipri] * Fix Bug #10306: Strings with Double Quotes get encoded wrongly [cipri] * Fix Bug #10596: Incorrect handling of text and html '0' bodies [cipri] * Fix Bug #10791: Unit tests fail [cipri] * Fix Bug #10792: No unit tests for recently fixed bugs [cipri] * Fix Bug #10793: Long headers don't get wrapped since fix for Bug #10298 [cipri] * Fix Bug #10816: Unwanted linebreak at the end of output [cipri] * Fix Bug #10838: bad use of MIME encoding in header. [cipri] Implemented Features: * Implement Feature #2952: Mail_mime::headers() saves extra headers [cipri] * Implement Feature #3636: Allow specification of charsets and encoding [cipri] * Implement Feature #4057: Mail_Mime: Add name parameter for Content-Type [cipri] * Implement Feature #4504: addHTMLImage does not work in cases when filename contains a path [cipri] * Implement Feature #5837: Mail_Mime: Build message for Net_SMTP [cipri] * Implement Feature #5934: Mail_Mime: choice for content disposition [cipri] * Implement Feature #6568: Mail_Mime: inline images referenced in CSS definitions not replaced. [cipri] * Implement Feature #10604: Put an option to specify Content-Location in the header [cipri]
1.5.0a1
1.3.1
alpha
stable
2007-06-10
BSD Style
Split off mail_MimeDecode
1.5.0RC1
1.3.1
beta
stable
2007-06-10
BSD Style
Split off mail_MimeDecode
1.5.0
1.3.1
stable
stable
2007-06-17
BSD Style
Split off Mail_MimeDecode
1.5.1
1.3.1
stable
stable
2007-06-20
BSD Style
* Fix Bug #11344: Error at line 644 in mime.php [cipri]
1.5.2
1.3.1
stable
stable
2007-06-21
BSD Style
* Fix Bug #11381: domain name is attached to content-id, trailing greater-than sign is not remove [cipri]
1.5.3
1.3.2
stable
stable
2009-12-29
BSD Style
Fixed bugs: * Fix Bug #14678: srand() lowers security [clockwerx] * Fix Bug #12921: _file2str not binary safe [walter] * Fix Bug #12385: Bad regex when replacing css style attachments [cipri] * Fix Bug #16911: Excessive semicolon in MIME header [alec] * Fix Bug #15320: Attachment charset is not set in Content-Type header [alec] * Fix Bug #16911: Lack of semicolon separator for MIME header parameters [alec] * Fix Bug #16846: Use preg_replace_callback() instead of /e modifier [alec] * Fix Bug #14779: Problem with an empty attachment [alec] * Fix Bug #15913: Optimize the memory used by Mail_mimePart::encode. Avoid having attachments data duplicated in memory [alec] * Fix Bug #16539: Headers longer than 998 characters aren't wrapped [alec] * Fix Bug #11238: Wrong encoding of structured headers [alec] * Fix Bug #13641: iconv_mime_encode() seems to work different/errorious than the build in logic. Removed 'ignore_iconv' param. [alec] * Fix Bug #16706: Incorrect double-quotes RFC 2231-encoded parameter values [alec] * Fix Bug #14232: RFC2231: tspecials encoding in _buildHeaderParam() [alec] Implemented Features: * Implement Feature #10438: Function (encodeHeader) for encoding of given header [alec]
1.6.0
1.4.0
stable
stable
2010-01-27
BSD Style
Bugs Fixed: * Don't break specified headers folding [alec] * Bug #17025: Wrong headers() result for long unwrapable header value [alec]

Implemented Features: * Allow setting Content-ID for HTML Images [alec] * Added one setParam() in place of many set*() functions [alec] * Added getParam(), getTXTBody(), getHTMLBody() [alec] * Skip RFC2231's charset if filename contains only ASCII characters [alec] * Make sure that Received: headers are returned on the top [alec] * Added saveMessageBody() and getMessageBody() functions [alec]
1.6.1
1.4.0
stable
stable
2010-03-08
BSD Style
Bugs Fixed: * Fix encoding of Return-Receipt-To and Disposition-Notification-To headers [alec]

Implemented Features: * Implement Feature #12466: Build parameters validation [alec] * Implement Feature #17175: Content-Description support for attachments [alec]
1.6.2
1.4.0
stable
stable
2010-03-23
BSD Style
Bugs Fixed: * Fix Bug #17226: Non RFC-compliant quoted-printable encoding of structured headers [alec]
1.7.0
1.4.0
stable
stable
2010-04-12
BSD Style
Implemented Features: * Added Mail_mime::setContentType() function with possibility to set various types in Content-Type header (also fixes problem with boundary parameter when Content-Type header was specified by user) [alec]
2010-07-29
1.8.0
1.4.1
stable
stable
BSD Style
Bugs Fixed: * Double-addition of e-mail domain to content ID in HTML images [alec] * #17311: Multi-octet characters are split across adjacent 'encoded-word's [alec] * #17573: Place charset parameter in first line of Content-Type header (if possible) [alec] Implemented Features: * #17518: addTo() method [alec]
2010-12-01
1.8.1
1.4.1
stable
stable
BSD Style
Bugs Fixed: * #18083: Not possible to set separate charset for attachment content and headers [alec]
2011-08-10
1.8.2
1.4.1
stable
stable
BSD Style
Bugs Fixed: * #18426: Fixed backward compatibility for "dfilename" parameter [alec] * Removed xmail.dtd, xmail.xsl from the package [alec] * Fixed handling of email addresses with quoted local part [alec]
2012-03-12
1.8.3
1.4.1
stable
stable
BSD Style
* Request #19009: Remove error_reporting from tests [alec] * Fixed Bug #19094: Email addresses do not have to contain a space between the name and address part [alec] * Fixed Bug #19328: Wrong encoding of filenames with comma [alec]
2012-05-17
1.8.4
1.4.2
stable
stable
BSD Style
* Request #19406: Allow to set individual attachment part headers [alec] * Fixed Bug #18982: Non-static method Mail_mimePart::encodeHeader() should not be called statically [alec]
2012-06-09
1.8.5
1.4.3
stable
stable
BSD Style
* Added possibility to set additional parameters of message part header, e.g. attachment size [alec] * Added automatic setting of attachment size via Content-Disposition header size parameter [alec]
2012-10-23
1.8.6
1.4.3
stable
stable
BSD Style
* Bug #19473: PEAR::isError() compatibility problem with PHP 5.4 [alec] * Bug #19497: Attachment filename is cut on slash character [alec] * Bug #19665: Add Mail-Reply-To and Mail-Followup-To to structured recipient headers list [alec]
2012-12-25
1.8.7
1.4.3
stable
stable
BSD Style
* Bug #5333: Fix more return by reference errors [alec] * Bug #19754: Fix compatibility with PHP4 [alec]
2013-07-05
1.8.8
1.4.3
stable
stable
BSD Style
* Fixed warning/notice on (static vs. non-static) PEAR::raiseError() usage [alec] * Fixed Bug #19761: PHP5 warnings about return by reference [alec] * Fixed Bug #19770: Make cid generator more unique on Windows [alec] * Fixed Bug #19987: E_STRICT warning when null is passed by reference [alec]
2014-05-14
1.8.9
1.4.3
stable
stable
BSD Style
* Fixed Bug #20273: Incorrect handling of HTAB in encodeHeader() [alec] * Fixed Bug #20226: Mail_mimePart::encodeHeader does not encode ISO-2022-JP string [alec] * Fixed Bug #20222: Broken Compatybility with PHP4 [alec]
2015-07-05
12:50:00
1.9.0RC1
2.0.0
beta
beta
BSD Style
* Drop PHP4 support, Fix warnings on PHP7 [alec] * Request #20564: Added possibility to unset headers [alec] * Request #20563: Added isMultipart() method [alec] * Request #20565: Accept also a file pointer in Mail_mimePart::encodeToFile(), Mail_mime::get() and Mail_mime::saveMessageBody() [alec]
2015-08-06
12:00:00
1.9.0
1.9.0
stable
stable
BSD Style
* Bug #20921: Make Mail_mimePart::encodeHeaderValue() a static method [alec] * Bug #20931: Really remove unset headers [alec] * Request #18772: Added methods for creating text/calendar messages [alec]