Mail_Mimepear.php.netMail_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 Groenendalcipricipri@php.netnoAleksander Machniakalecalec@php.netyes2021-09-051.10.111.10.0stablestableBSD Style
* Fix PHP 8.1: strlen(): Passing null to parameter #1 ($string) of type string is deprecated [alec]
* Fix encoding recipient names with @ character and no space between name and address [alec]
* Fix the license label in composer.json [jnkowa-gfk]
5.2.01.6.01.01.0stablestable2001-12-28PHP
This is the initial release of the Mime_Mail package.
1.11.1stablestable2002-04-03PHP
This is a maintenance release with various bugfixes and minor enhancements.
1.21.2stablestable2002-07-14PHP
* 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.11.2.1stablestable2002-07-27PHP
* License change
* Applied a few changes From Ilia Alshanetsky
1.3.0RC11.3.0RC1betabeta2005-03-20PHP
* First release in over 2.5 years (!)
* MANY bugfixes (see the bugtracker)
* added a few tests
1.3.01.3.0stablestable2005-04-01PHP
* 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.11.3.1stablestable2005-07-13PHP1.4.0a11.3.1alphastable2007-03-08bsd 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.0a21.3.1alphastable2007-04-05bsd 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.0a31.3.1alphastable2007-04-05bsd 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.0RC11.3.1betastable2007-04-12bsd style
* Fix Bug #10232: Gmail creates double line break when \r\n is used [cipri]
1.4.0RC21.3.1betastable2007-04-22bsd 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.0RC31.3.1betastable2007-04-24bsd style
* Fix Bug #10816: Unwanted linebreak at the end of output [cipri]
1.4.0RC41.3.1betastable2007-04-28bsd style
* Fix Bug #3513: support of RFC2231 in header fields. [cipri]
* Fix Bug #10838: bad use of MIME encoding in header. [cipri]
1.4.01.3.1stablestable2007-05-05BSD 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.0a11.3.1alphastable2007-06-10BSD Style
Split off mail_MimeDecode
1.5.0RC11.3.1betastable2007-06-10BSD Style
Split off mail_MimeDecode
1.5.01.3.1stablestable2007-06-17BSD Style
Split off Mail_MimeDecode
1.5.11.3.1stablestable2007-06-20BSD Style
* Fix Bug #11344: Error at line 644 in mime.php [cipri]
1.5.21.3.1stablestable2007-06-21BSD Style
* Fix Bug #11381: domain name is attached to content-id, trailing greater-than sign is
not remove [cipri]
1.5.31.3.2stablestable2009-12-29BSD 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.01.4.0stablestable2010-01-27BSD 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.11.4.0stablestable2010-03-08BSD 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.21.4.0stablestable2010-03-23BSD Style
Bugs Fixed:
* Fix Bug #17226: Non RFC-compliant quoted-printable encoding of structured headers [alec]
1.7.01.4.0stablestable2010-04-12BSD 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-291.8.01.4.1stablestableBSD 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-011.8.11.4.1stablestableBSD Style
Bugs Fixed:
* #18083: Not possible to set separate charset for attachment content and headers [alec]
2011-08-101.8.21.4.1stablestableBSD 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-121.8.31.4.1stablestableBSD 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-171.8.41.4.2stablestableBSD 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-091.8.51.4.3stablestableBSD 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-231.8.61.4.3stablestableBSD 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-251.8.71.4.3stablestableBSD Style
* Bug #5333: Fix more return by reference errors [alec]
* Bug #19754: Fix compatibility with PHP4 [alec]
2013-07-051.8.81.4.3stablestableBSD 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-141.8.91.4.3stablestableBSD 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-051.9.0RC12.0.0betabetaBSD 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-061.9.01.9.0stablestableBSD 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]
2015-09-131.10.01.10.0stablestableBSD Style
* Add possibility to add externally created Mail_mimePart objects as attachments [alec]
* Add possibility to set preamble text for multipart messages [alec]
2017-05-211.10.11.10.0stablestableBSD Style
* Fix Bug 21206: explodeQuotedString() does not handle quoted strings correctly [dfukagaw28]
* Fix Bug 21205: Invalid encoding of headers with quoted multibyte strings in non-unicode charset [dfukagaw28]
* Fix Bug 21098: Discrepancy in handling of empty (but set) plain text part [alec]
2017-11-171.10.21.10.0stablestableBSD Style
* Fix Bug #21255: Boundary gets added twice when using setContentType() [alec]
* PHP 7.2 compatibility fixes [alec]
2019-09-251.10.31.10.0stablestableBSD Style
* Fix deprecation warning for get_magic_quotes_runtime() use on PHP 7.4 [alec]
2019-10-131.10.41.10.0stablestableBSD Style
* Fix E_STRICT errors introduced in the previous release [alec]
2020-01-241.10.51.10.0stablestableBSD Style
* Make sure to not set Content-Transfer-Encoding on multipart messages [alec]
* Added support for calendar invitations with attachments/html/images [jacalben]
2020-01-301.10.61.10.0stablestableBSD Style
* Fix different boundary in headers and body when using headers() after get() [alec]
* Removed phail.php script [alec]
2020-03-011.10.71.10.0stablestableBSD Style
* Fix invalid Content-Type for messages with only html part and inline images [alec]
2020-06-131.10.81.10.0stablestableBSD Style
* Fix encoding issues with ISO-2022-JP-MS input labelled with ISO-2022-JP [shirosaki]
2020-06-271.10.91.10.0stablestableBSD Style
* Added a workaround for an opcache bug on OpenSuse 15.1 [alec]
2021-01-171.10.101.10.0stablestableBSD Style
* Compatibility fixes for PHP 5.2 and 5.3 [alec]
* Corrected soft line breaks handling to be RFC compliant [ixs]
* Corrected line breaks for lines ending in dots and length more than 74 [ixs]