PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Mime

Mail_Mime provides classes to create MIME messages.

Download latest release 1.10.12 (there might be newer Composer installable version)

License: BSD Style

Description

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.

Documentation

Manual

Maintainers

Dependencies

Required

Releases

Bugs

IDStatusTypeVersionDateSummary
#24Wont fixBug2003-09-19Mail/mime.php does not follow CS
#30ClosedBug2003-09-23Mail_Mime: _encodeHeaders is not RFC-2047 compliant.
#38ClosedBug2003-09-26Undefined variable in mimedecode.php
#44BogusBug2003-09-29Malformed attachement encoding
#333BogusBug2003-12-01Only variables or references can be returned by reference
#443Wont fixBug2003-12-16Bug in MAIL_mime::addAttachment()
#465BogusBug2003-12-19boundary= on ln 223 should not have "'s
#503BogusBug2003-12-30PEAR mime file causing Fatal Error (ref. bug 333) with PHP 5
#549ClosedBug2004-01-08Mail/mimeDecode fails to decode attachement body
#687BogusBug2004-02-05Not correctly decode 'From:' header field
#695ClosedBug2004-02-06Can't send text only messages
#779BogusBug2004-02-17Attachments ignored in PHP >= 4.3.2
#788ClosedBug2004-02-18HTML & TEXT mail components not recognized in Apple's Mail program
#791BogusBug2004-02-18Links in HTML format email do not work
#915BogusBug2004-02-26Cannot decode MIME when set specific PHP Enviormental value.
#1132ClosedBug2004-04-04Fails to decode attachements with BASE64
#1436BogusReq2004-05-18Useing addHTMLImage (latest version)
#1491ClosedBug2004-05-25Boundary string generation too "expensive"
#1518DuplicateBug2004-05-27Wrong header Mime conversion
#1591Wont fixBug2004-06-09max 65530 Mails
#1783BogusBug2004-07-04PHP crashes on big attachments
#1841Wont fixBug2004-07-11Mail_mimePart produces non-recognizable messages
#1943No FeedbackBug2004-07-21build parameters in mime->get() don't work
#2113ClosedBug2004-08-11Fatal error: Using $this when not in object context in /usr/local/lib/php/Mail/
#2120ClosedBug2004-08-13Undefined variable: parts in mimeDecode.php on line 469
#2311ClosedBug2004-09-10Method modification needed
#2312DuplicateBug2004-09-10MimeDecode php5 fatal error
#2364ClosedBug2004-09-21_quotedPrintableEncode() does not encode TAB followed by (CR)LF
#2477DuplicateBug2004-10-07Upper-case encoding's name doesn't get the body decoded
#2481ClosedBug2004-10-08multipart not detected if enclosed in double quotes
#2513BogusBug2004-10-12Default Paramters for factory
#2542No FeedbackBug2004-10-15Subarray in _encodeHeaders causes error
#2835ClosedBug2004-11-26str_replace bug in Mail_mime::&get() /w Patch
#2952ClosedReq2004-12-12Mail_mime::headers() saves extra headers
#3169ClosedBug2005-01-11no body
#3206BogusBug2005-01-14Wrong Mime Decoding
#3318No FeedbackBug2005-01-27mimeDecode.php - decoding of emails not consistent?
#3353No FeedbackBug2005-02-01Images not showing in HTML mail but as attachments
#3400ClosedBug2005-02-08Typo in Mime-Decode.php
#3415No FeedbackBug2005-02-09FROM ADDRESS with quote and double quotes
#3471Wont fixReq2005-02-14Remove the constraint on order of get / header
#3488ClosedBug2005-02-16Header delimiters don't survive in sessions
#3490BogusReq2005-02-16mime->headers; change merge order
#3491DuplicateBug2005-02-16Please fix typo.
#3513ClosedBug2005-02-18support of RFC2231 in header fields.
#3578BogusBug2005-02-24wrong quotable encoding
#3636ClosedReq2005-02-28Allow specification of charsets and encoding
#3667ClosedBug2005-03-02case-sensitive decoding problem
#3729VerifiedReq2005-03-07Support for signed messages
#3742BogusBug2005-03-08parseAddressList() returns error with valid formats
#3890BogusBug2005-03-19Problems with Mozilla Mail 1.8b1
#3916Wont fixReq2005-03-22Ability to GPG Encode attachments
#3940ClosedBug2005-03-24Mismatch between documatation and implementation
#4015No FeedbackBug2005-03-31qb bug
#4020BogusBug2005-03-31Content-type not added in headers
#4057ClosedReq2005-04-04Mail_Mime: Add name parameter for Content-Type
#4297ClosedReq2005-05-06HTML background image name not replaced
#4317BogusBug2005-05-10errorneous implementation of header encoding in Mail_Mime::_encodeHeaders()
#4358No FeedbackBug2005-05-16= Don't show correctly under Mac Mail
#4408BogusBug2005-05-22HTML Parts Incorrect HREF=3D""
#4455ClosedBug2005-05-27addHTMLImage requires attribute SRC of tag IMG in lowercase
#4504ClosedReq2005-06-01addHTMLImage does not work in cases when filename contains a path
#4696ClosedBug2005-06-28addAttachment crash
#4721BogusBug2005-06-30send is the last statment
#4758ClosedBug2005-07-06Inline/HTML images don't display as background images
#4795ClosedBug2005-07-12Error adding zero-byte attachments
#4979Wont fixReq2005-08-03handy wrapper class for Mail_Mime
#4984ClosedBug2005-08-03Mail_mimePart addSubPart Example error
#5062BogusBug2005-08-10'=' not handled properly
#5201Wont fixBug2005-08-24Mail_Mime: addHTMLImage not determining attachment Content-Type
#5272BogusBug2005-09-01Mail_Mime: Odd string within HTML Body results in incomplete mime message
#5333ClosedBug2005-09-08Only variables should be returned by reference; triggers notices since php 4.4.0
#5400ClosedBug2005-09-14Do not return function reference
#5485ClosedBugOLD2005-09-21Spurious carriage returns mess up encoding
#5555No FeedbackBug2005-09-29Mail_Mime: Attachements not displayed and content is empty on MAC
#5617ClosedDoc2005-10-06Explain that order of method calls get() and headers() of Mail_mime matter
#5710ClosedBug2005-10-18Little reference bugs
#5837ClosedReq2005-10-31Mail_Mime: Build message for Net_SMTP
#5848BogusBug2005-11-02Warning: strpos(): Empty delimiter. in /usr/share/php/Mail/RFC822.php
#5890ClosedBug2005-11-07Only variable references should be returned by reference
#5934ClosedReq2005-11-11Mail_Mime: choice for content disposition
#6260ClosedBug2005-12-16Just a notice with PHP5
#6261ClosedBug2005-12-16php 5.1.1 upgrade
#6296No FeedbackBug2005-12-19MIME headers not generated unless setHTMLBody() called
#6372BogusBug2005-12-30empty content-id field (RFC 2112 compliancy)
#6568ClosedReq2006-01-24Mail_Mime: inline images referenced in CSS definitions not replaced.
#6663ClosedBug1.3.12006-02-02Notice about reference passing
#6712BogusBug1.3.12006-02-07Returning references
#6726BogusBug1.3.12006-02-08_mimeencodeheaders
#6926No FeedbackBug1.3.12006-02-24Mail_Mime: addHTMLImage add multiple attachments
#7057BogusBug1.3.12006-03-08PHP reference passing
#7265BogusBug1.3.12006-03-30Only variable references should be returned by reference
#7484BogusBug1.1.92006-04-25Mail_Mimedecode: Fails to identify filename
#7553BogusBug1.3.12006-05-03problems with return by reference
#7561ClosedBug1.3.12006-05-05Mail_mimePart::_quotedPrintableEncode() misbehavior with mbstring overload
#7713ClosedBug1.3.12006-05-24PHP5 Notice: Only variable references should be returned by reference
#7772BogusReqCVS2006-05-31casper
#7794No FeedbackBug1.3.12006-06-02No attach files more 8kb
#8223ClosedBugCVS2006-07-14Incorrectly encoded quoted-printable headers
#8297BogusReqCVS2006-07-26Content type charset does not need to be in quotes
#8312BogusBug1.3.12006-07-28Only variable references should be returned by reference
#8333BogusReq2006-07-31Changing encode type ISO -> UTF-8
#8386ClosedBug1.3.12006-08-08HTML body not correctly encoded if attachments present
#8541ClosedBugCVS2006-08-23mimePart.php line delimiter is \r
#8718BogusBug1.3.12006-09-16Mail_mime is not error_reporting = E_ALL compatible
#8812ClosedBug1.3.12006-09-29user header updates overwritten
#9347ClosedBug1.3.12006-11-15Notices about references
#9536DuplicateBug1.3.12006-12-04Error in parsing attachment filename
#9558ClosedBugCVS2006-12-06Broken multiline headers
#9711ClosedBug1.3.12006-12-29missing spaces in subject with german umlaut
#9722ClosedBug1.3.12007-01-02_quotedPrintableEncode does not encode dot at start of line on Windows platform
#9725ClosedBug1.3.12007-01-03multipart/related & alternative wrong order
#9956ClosedBug1.3.12007-01-26Notices being thrown
#9976ClosedBug1.3.12007-01-30Subject encoded twice
#10146ClosedBug1.4.0a12007-02-21mbstring fails to recognize encodings.
#10158ClosedBug1.4.0a12007-02-22Inline images not displayed on Mozilla Thunderbird
#10232ClosedBug1.3.12007-03-01Gmail creates double line break when \r\n is used
#10298ClosedBugCVS2007-03-07Mail_mime, double Quotes and Specialchars in from and to Adress
#10306ClosedBug1.4.0a12007-03-08Strings with Double Quotes get encoded wrongly
#10438ClosedReq1.3.12007-03-21function for encoding of given string
#10510BogusBug1.4.0a12007-03-26multipart/related & alternative wrong order
#10596ClosedBug1.3.12007-04-02Incorrect handling of text and html '0' bodies
#10604ClosedReq1.4.0a12007-04-04Put an option to specify Content-Location in the header
#10791ClosedBug1.4.0RC12007-04-21Unit tests fail
#10792ClosedBug1.4.0RC12007-04-21No unit tests for recently fixed bugs
#10793ClosedBug1.4.0RC12007-04-21Long headers don't get wrapped since fix for Bug #10298
#10816ClosedBug1.4.0RC22007-04-23Unwanted linebreak at the end of output
#10838ClosedBug1.4.0RC32007-04-25bad use of MIME encoding in header.
#10884ClosedReq1.4.0RC42007-04-29Provide easy way to set build params
#10963BogusBug1.4.02007-05-07Incorrect default linebreak
#10999ClosedBug1.4.02007-05-10Bad Content-ID(cid) format
#11162ClosedDoc1.4.02007-05-27Reorder documentation links
#11238ClosedBug1.4.02007-06-06From address encoding
#11344ClosedBug1.5.02007-06-18Error at line 644 in mime.php
#11367ClosedBug1.5.02007-06-19Content-Type not in header?
#11381ClosedBug1.5.12007-06-21domain name is attached to content-id, trailing greater-than sign is not remove
#11731ClosedBug1.5.22007-07-31Full stops after soft line breaks are not encoded
#11798ClosedBug2007-08-08Accent in From field of email causes an error in validation
#12032ClosedBug1.5.22007-09-12html emails don't display properly in Outlook 2003
#12115ClosedBug1.5.22007-09-25Mail_mime: Reference problem
#12165ClosedBugCVS2007-10-01Dot at the end of the line disappeared
#12216ClosedBug1.5.22007-10-10Incorrect Mail_mime::headers() behaviour (russian text, utf8)
#12385ClosedBug1.5.22007-11-05Bad regex when replacing css style attachments
#12411ClosedReq1.5.22007-11-09Support RFC 2047 standard for non-ascii characters as attachment filename.
#12429DuplicateBug1.5.22007-11-12Attachments with long files names are causing difficulty
#12456ClosedBug1.5.22007-11-15srand() causing complication on hardware with broken clock
#12466ClosedReqCVS2007-11-17wrong text_encoding or text_charset in get()
#12551BogusBug1.5.22007-11-29dots on their own line sometimes not encoded
#12628ClosedBug1.5.22007-12-06Extra newline causes invalid Mime, breaks GMail
#12716BogusBug1.5.22007-12-18Invalid Content-Transfer-Encdoing on multipart messages
#12914ClosedBug1.5.22008-01-15PHP5 doesn't accept subjects containing \n in Function mail()
#12921ClosedBug1.5.22008-01-17_file2str not binary safe
#12988ClosedDoc2008-01-28User note that is a documentation problem
#13032ClosedBug1.5.22008-01-31Incorrect Boundary For Multi Par w/Attchment
#13444ClosedBug1.5.22008-03-20problem in multipart mail with txt, html and images
#13467ClosedBug1.5.22008-03-22Wrong PHP Version listed in dependencies
#13468AssignedReq1.5.22008-03-22Add option to fetch http:// images/stylesheets
#13495Wont fixBug1.5.22008-03-25urlencoded domainname in cid breaks mime mails in gmail
#13641ClosedBug1.5.22008-04-10iconv_mime_encode seems to work different/errorious than the build in logic
#13672ClosedDocCVS2008-04-14document needs to emphasise that get() must be called before headers()
#13962ClosedReq1.5.22008-05-23Improve Multiple header support
#13969ClosedReq1.5.22008-05-23Patch to stream attachments to counter memory issues
#14232ClosedReqCVS2008-06-25RFC2231: Improve tspecials encoding in _buildHeaderParam()
#14390Wont fixBugCVS2008-07-22attachments not correctly escaped
#14529ClosedBugCVS2008-08-20basename() problem with utf-8
#14597ClosedBug1.5.22008-09-04Factory with smtp and Mime gets email wrong
#14599DuplicateBug1.2.0b12008-09-05Incorrect encoding of non-latin strings in From, To, Bcc and Cc fields
#14678ClosedBug1.5.22008-09-21Security issue due to seeding random number generator
#14779ClosedBugCVS2008-10-12empty file problem
#14780ClosedBug1.5.22008-10-12Content-Type: Multipart/alternative is not set correctly.
#15137DuplicateBug1.5.22008-11-23Special characters in subject and possibly other fields
#15320ClosedBugCVS2008-12-16attachment charset is not set in Content-Type header
#15561ClosedBug1.5.22009-01-08CSS URL image references lose a quote when sent
#15888ClosedBug2009-02-10attachment name/filename header lacks semicolon separator
#15913ClosedReq2009-02-18Attachments Memory Optimization
#16004ClosedBug1.5.22009-03-10addAttachment cut my pdf file after 147Ko
#16363BogusBug1.5.22009-06-22Charset for multipart/related unset. Suggest setting using head_charset.
#16493ClosedBug1.5.22009-08-04The charset for the headers cannot be set
#16539ClosedBug1.5.22009-08-19Long headers break mime body display
#16623ClosedBug1.5.22009-09-17When sending mails with attachments, the same boundaries are used
#16695BogusBug1.5.22009-10-12Incorrect use of PEAR: Non-static method PEAR::isError() should not be called
#16706ClosedBug1.5.22009-10-16Incorrectly double-quotes RFC 2231-encoded parameter values
#16846ClosedBugCVS2009-11-29/e modifier not allowed by suhosin
#16847BogusBug1.5.22009-11-29Mail.php not found
#16911ClosedBugCVS2009-12-16Excessive semicolon in MIME header
#17025ClosedBug1.5.32010-01-22Mail_mime#headers() bug
#17070BogusBug1.6.02010-02-05UTF8 charset works but some characters appear as double question marks ??
#17175ClosedReqSVN2010-03-01Content-Description support in Mail_mime class
#17181ClosedBug1.6.02010-03-01CC header Problem
#17188ClosedBug1.6.02010-03-03Russian characters in subject are not display
#17226ClosedBug1.6.12010-03-15Mail_mimePart::encodeHeader is not RFC2047 full compliant
#17311ClosedBug1.7.02010-04-13Wrong UTF-8 Subject depending on linebreak
#17516ClosedDoc1.7.02010-06-23outdated end-user documentation
#17518ClosedReq1.7.02010-06-23method addTo
#17573ClosedBug1.7.02010-07-07Content-Type: header problem
#17891No FeedbackBug1.8.02010-09-23Header folding causes some mail clients to break.
#18048No FeedbackBug1.3.x2010-11-12I can't send mail using addHTMLImage function in Mail_mime
#18083ClosedReqSVN2010-11-23Not possible to set separate charset for attachment content and headers
#18205No FeedbackBugSVN2011-01-21addHTMLImage inserts partical cid (with no @domain)
#18426ClosedBug1.8.12011-04-08Wrong key in $params of Mail_mimePart class
#18567ClosedBug1.8.12011-05-26addHTMLImage causes the text portion to break
#18764BogusBug1.8.22011-08-28Inline images in gmail appear attached
#18772ClosedReq1.8.22011-08-31Add text/calendar helper functions
#18798BogusBug1.8.22011-09-07package not found
#18922ClosedDoc1.8.22011-10-22$content_id parameter not documented for Mail_Mime::addHTMLImage() function
#18936ClosedDoc1.8.22011-10-28Example for Mail_mime not working
#18982ClosedBug1.8.22011-11-11Non-static method Mail_mimePart::encodeHeader() should not be called statically
#19009ClosedBugSVN2011-11-14remove error_reporting (for PEAR QA team)
#19094ClosedBug1.8.22011-12-01Wrong email_regexp pattern
#19250ClosedDocSVN2012-01-26Source link is broken on package home
#19328ClosedBugSVN2012-03-12Wrong encoding of filenames with comma
#19406ClosedReq1.8.32012-05-02Allow to set individual attachment part headers
#19473ClosedBug1.8.52012-06-16Compatibility problem PHP 5.4
#19497ClosedBug2012-07-09Attachment filename is cut on slash character
#19653Wont fixBug1.8.52012-10-15Mail_mimePart::encodeHeader() strips off quotes
#19659DuplicateBug1.8.52012-10-20Mail_mine::get() throws nonsense error
#19665ClosedBug1.8.52012-10-22Treat Mail-Reply-To and Mail-Followup-To as structured recipient headers
#19754ClosedBug1.8.62012-12-17Parse error in mime.php
#19761ClosedBug1.8.72012-12-27PHP-5.x warnings
#19770ClosedBug1.8.72013-01-03html image cid generation on windows
#19905No FeedbackBug1.8.72013-04-17Sending email with html body, txt body and attachment ignore html body
#19987ClosedBug1.8.72013-06-21Only variables should be assigned by reference
#19990ClosedBugSVN2013-06-24Warning on PEAR::raiseError() call
#20077OpenDoc1.8.82013-09-30update Mail_Mime's documentation for &get() -> get()
#20218BogusBug1.8.82014-03-14wrong include path: `require_once('Mail/mimePart.php')` within Mail/mime.php
#20222ClosedBug1.8.82014-03-181.8.8 not compatible with PHP4
#20223OpenDoc1.8.82014-03-19Working together with Mail
#20226ClosedBug1.8.82014-03-21Mail_mimePart::encodeHeader does not encode ISO-2022-JP string.
#20273ClosedBug1.8.82014-05-14Incorrect handling of HTAB in encodeHeader()
#20518OpenDoc1.8.92015-03-19The documentation for addHTMLImage() is wrong
#20563ClosedReqSVN2015-06-21isMultipart() method
#20564ClosedReqSVN2015-06-21Possibility to unset headers
#20565ClosedReqSVN2015-06-28Possibility to save mimePart into an open stream
#20921ClosedBug1.9.0RC12015-07-18Non-static method Mail_mimePart::encodeHeaderValue()
#20931ClosedBug1.9.0RC12015-08-02Unsetting headers does not remove a header
#20938OpenReq1.9.02015-08-18Support for PGP encrypted & signed mails
#20948BogusReqSVN2015-09-14main
#21027ClosedReq1.10.02016-02-12Support calendar body along with attachments and html images
#21098ClosedBug1.10.02016-07-14Discrepancy in handling of empty (but set) plain text part
#21176No FeedbackReq1.10.02017-02-03mail is going to spam or junk foilder
#21203ClosedBug1.10.02017-04-29Remove deprecated features from tests
#21204DuplicateBug1.10.02017-04-29Remove deprecated features from tests
#21205ClosedBug1.10.02017-04-29De-quoting fails
#21206ClosedBug1.10.02017-04-29explodeQuotedString() does not handle quoted strings correctly
#21255ClosedBug1.10.12017-11-05boundary gets added twice
#23734BogusBug1.10.22018-01-09count(): Parameter must be an array / mimePart.php on line 314
#23757ClosedBugUnknown2018-07-02Unescaped spaces in attachment filename