zetacomponents/mail
The component allows you construct and/or parse Mail messages conforming to the mail standard. It has support for attachments, multipart messages and HTML mail. It also interfaces with SMTP to send mail or IMAP, POP3 or mbox to retrieve e-mail.
1.10.1
2.0M downloads/mo
#4616 most downloaded on Packagist
zetacomponents/Mail
What this package is like to depend on
Last release 1 years ago
17 Mar 2025
Release timing varies
gaps range from 8 days to 3.0 years
Nearly every release is documented
notes for 53 of 54 stable releases
Nothing withdrawn
no release was ever pulled
20 years old
54 releases · first in 2006
0 releases in the last 12 months
see the full history below
Release timeline
54 releases · Apr 2006 to Mar 2025Releases
latest 54-
1.10.117 Mar 2025Release notes
Open source →- Fixed #97: Zoho IMAP authentication fails, as there is an extra line in the response, just like GMail does.
-
1.10.012 Mar 2025Release notes
Open source →- Fixed #96: Add new option 'parseMultipartMixedTextAttachmentsAsFiles' to ezcMailParserOptions to retrieve only text attachments, that are sub-parts of multipart/mixed parts an ezcMailFile object, instead of the default ezcMailText object.
-
1.9.720 Aug 2024Release notes
Open source →- Fixed #93: Define ezcMail{Pop3,Imap}Set::$connection property to avoid deprecation notice.
- Fixed #94: PHP 8.4: Fix the 'Implicitly marking parameter $ as nullable is deprecated' warning. (Eileen McNaughton)
-
1.9.614 Sep 2023Release notes
Open source →- Fixed #90: Allow longer email addresses than the SMTP spec allows for Return-Path.
-
1.9.506 Sep 2023Release notes
Open source →- Fixed tests.
- Fixed #87: Use filter_var(FILTER_VALIDATE_EMAIL) instead of homegrown validation for email addresses.
-
1.9.414 Sep 2022 -
1.9.309 Aug 2022Release notes
Open source →- Fixed #88: Support for PHP 8.1/8.2 and PHPUnit 8.0 compatibility fixes.
- Fixed: Update regex for return path to allow for a single quote to be included in the email as permitted by the RFC. (Seamus Lee)
-
1.9.213 Jun 2020Release notes
Open source →- Fixed #45: File name too long when parsing attachments.
- Fixed #66: Attachment filename too long.
- Fixed #80: Fixed bug in openFile() function. (Michael Kliewe)
- Fixed #82: Fix issue where using array_key_exists on an object is deprecated in PHP 7.4. (Seamus Lee)
-
1.9.117 Jan 2020 -
1.9.016 Jan 2020Release notes
Open source →- Fixed #31: Provide a listLimit option to prevent fetch queries from exceeding the server's query size limit. (Mark Burdett)
- Fixed #77: Curly-brace syntax for array and string access is deprecated in PHP 7.4
- Add support for XOAUTH2 authentication method for IMAP. (Seamus Lee)
-
1.8.417 Oct 2019Release notes
Open source →- Fixed #51: User names and passwords need to be escaped if they contain spaces. (Mark Burdett)
- Fixed #61: create_function() is deprecated in PHP 7.2. (Derick Rethans)
- Fixed implode() argument order. (Michael Kliewe)
- Fixed regexp patterns for PHP 7.3 and later. (Derick Rethans)
-
1.8.318 Nov 2017Release notes
Open source →- Fixed 'Undefined offset: -1' notice when parsing Delivery Status parts (Marcel Toben, Daniel Tschinder).
- Fix error when trying to access email from null (Daniel Tschinder).
- Checking if variable is resource mitigates against possible PHP Object Injection exploits (Casper Langemeijer).
- Fixed a code-bug when counting parts for RFC2231 reading (Derick Rethans).
-
1.8.212 Nov 2017Release notes
Open source →- Added support for XOAUTH2 authentication method for SMTP transport (Ian Berry).
- Fixed a bug with a space around file names in Content-Disposition headers (Alexey Alyoshin)
- Allow ezcMailVirtualFile and ezcMailStreamFile to be handled in ezcMail::walkParts (Brend Rathmanner)
- Fixed empty filename in file_parser (Michael Kliewe)
- Update STARTTLS parsing to allow "250 STARTTLS" (John Corser)/\t
- Fixed issue #58: Restrict the set of characters that can be used as the email address for the ezcMail returnPath property. (CVE-2017-15806, reported by "Kay")
-
1.8.104 Nov 2014Release notes
Open source →- Fixed double folding on e-mail headers.
- Make ezcMailComposer::generateHtmlPart protected instead of private.
- Fixed issues with NTML authentication.
- Fixed issues with TLS sessions and unencrypted SMTP connections.
-
1.6.322 Jun 2009Release notes
Open source →- Fixed issue #15068: false ezcMail tests. Based on a patch from Thomas Koch.
-
1.6.211 May 2009 -
1.6.109 Feb 2009Release notes
Open source →- Fixed issue #14242: Cannot append email through IMAP.
- Fixed issue #14360: problems with $imap->top() command in gmail.
-
1.5.206 Oct 2008Release notes
Open source →- Fixed an issue that caused the part boundaries from e-mail messages not being correctly set in the parsed mail structure. Instead an auto-generated one was used.
- Fixed issue #13553: Documented how to access the raw value of headers.
- Implemented feature request #13538: Added possibility to set a custom message in mail multiparts for e-mail clients missing MIME support.
-
1.5.104 Aug 2008Release notes
Open source →- Fixed issue #13329: ezcMail fetchParts() no longer generates an error when parsing a mail with an empty body.
- Fixed a special case in sortFromOffset() where $range was undefined.
- Fixed an issue with duplicate properties arrays in mail part descendants.
-
1.4.303 Mar 2008Release notes
Open source →- Fixed issue #12595: Folding is no longer applied twice for To, Cc and Bcc headers.
-
1.4.217 Jan 2008 -
1.4.114 Jan 2008Release notes
Open source →- Fixed issue #12318: Unsafe characters are replaces by underscores in attachment file names during mail parsing.
-
1.1.228 Aug 2006Release notes
Open source →- Added the ezcMailPop3Transport::fetchByMessageNr() method that returns an ezcMailPop3Set containing the message with the specified number.
- Fixed bug #8736: variable transport non-functional.
- Fixed bug that caused the contentId property of the ezcMailFile class not to be set even if it was available for the related part while parsing multipart/related messages.
- PHP 5.2 compatibility.
-
1.1.107 Aug 2006Release notes
Open source →-
Partially fixed bug #8694:
- Don't crash when generating empty mail.
- Don't assume that message/ parts are actually rfc822 messages when parsing mail.
-
-
1.8beta116 May 2014Nothing published for this version
-
1.827 Sep 2014Release notes
Open source →- fixed mailbox names with spaces not being properly quoted
- Fixed bug parsing img tags in the html
- Trim header values before they are being set in the headers_holder
- Fixed #16154: Bcc headers are not stripped when using SMTP.
- Fixed #16347: Inline images in the mail composer are not added other attributes precede the src attribute.
- Fixed #16348: Adding inline images in the mail composer with whitespace in the path fails.
- Fixed #16470: Mail test suite causes fatal errors because of transport errors in destructor.
- Fixed #ZETACOMP-75: Mail parser doesn't understand uppercase "CHARSET" that alpine uses.
- Fixed #ZETACOMP-76: MailTools::replyTo will always use REPLY_ALL instead of distinguishing between REPLY_ALL and REPLY_SENDER.
- Fixed #ZETACOMP-77: Mail still uses "eZ Components" as User-Agent, which should be "Apache Zeta Components".
- Fixed #7: PREG_REPLACE_EVAL is deprecated, use preg_replace_callback
- Fixed #8: Fixed header Mime encoding failing using multi-byte characters
- Fixed #9: Fixed composer.json to use dev-master for unit-test component, since there is no stable release of it.
-
1.7rc107 Dec 2009 -
1.7beta123 Nov 2009Release notes
Open source →- Fixed issue #15837: imap.google.com (google gmail) changed IMAP response.
-
1.7alpha109 Nov 2009Release notes
Open source →- Fixed test cases for PHP 5.3 and later.
- Implemented feature request #14023: Split ezcMailComposer's addAttachment into a function for adding file attachments and for adding attachments from strings.
- Implemented feature request #14257: Problem accessing multiple headers with same headername.
- Implemented feature request #14487: Enable ezcMailComposer to specify encoding for text and html parts.
- Implemented feature request #14794: Add an option to parse text attachments as file part instead of text part.
- Fixed issue #15341: ezcMailFileParser class function appendStreamFilters not working properly for quoted-printable.
- Fixed issue #15456: Problems with parsing emails that have "charset = " instead of "charset=".
-
1.721 Dec 2009 -
1.6rc115 Dec 2008Release notes
Open source →- Fixed issue #14025: Problem with ezcMailComposer::addAttachment when use the fifth param to change the file name.
-
1.6beta101 Dec 2008Release notes
Open source →- Fixed issue #14009: ezcMailTools::validateEmailAddressMx() uses wrong HELO domain name.
- The function ezcMailTools::validateEmailAddressMx() throws an exception if there is no support for getmxrr() and checkdnsrr().
- Altered the ezcMailTools::validateEmailAddress() regexp to protect against locale issues.
-
1.6alpha110 Nov 2008Release notes
Open source →- Implemented issue #13383: Add a method to extract/change/replace entities in HTML mail with the CID elements replaced.
- Implemented feature request #13539: Add new mail parser option fileClass.
- Fixed issue #13878: Endless loop in ezcMailParser.
-
1.605 Jan 2009 -
1.5rc110 Jun 2008Release notes
Open source →- Fixed issue #13038: Added support for non-ascii and mime-emcoded (non-RFC) filenames for mail attachments.
-
1.5beta127 May 2008Release notes
Open source →- Fixed issue #13010: The transport connection handles correcly cases where CRLF is split in 2 different blocks read from server.
-
1.5alpha105 May 2008Release notes
Open source →- Fixed issue #12844: getTmpDir() not properly set in Windows.
- Fixed issue #12903: The mail digest size is not calculated twice anymore.
- Fixed issue #12930: The SMTP authentication methods are used in correct strength order now.
- Implemented feature request #11937: Switch to turn off automatic inclusion of files with the Mail Composer.
- Implemented feature request #12203: Replaced hard-coded paths for temporary directory with the PHP 5.2.1 function sys_get_temp_dir().
- Implemented feature request #12694: Replace reflection test for class type with SPL function.
-
1.516 Jun 2008 -
1.4rc105 Dec 2007Release notes
Open source →- Fixed issue #12138: Mail's IMAP transport can hang when connection gets dropped.
-
1.4beta128 Nov 2007Release notes
Open source →- Fixed issue #11906: Only files inside an image tag are attached to the composed email.
- Fixed issue #11965: Reading from a transport connection is stopped at CRLF or a problem in the connection, and not after a hard-coded number of loops.
- Fixed issue #12062: Mails with no space or tabs after the colon in headers are parsed correctly now.
-
1.4alpha229 Oct 2007Release notes
Open source →- Fixed issue #11582: ezcMailImapSet won't be caught in an infinite loop if the mail headers or body contain an IMAP tag.
- The IMAP, POP3 and SMTP transports and the ezcMailParser class can receive options objects in the constructor. They can still receive options as arrays to keep compatibility.
-
1.4alpha118 Sep 2007Release notes
Open source →- Implemented feature request #8436: Added the method validateEmailAddress() in ezcMailTools.
- Implemented feature request #10459: Added the searchMailbox() method to the IMAP transport. Based on a patch from Sinisa Dukaric.
- Implemented feature request #10659: Added the getHierarchyDelimiter() method to the IMAP transport.
- Implemented feature request #10996: Added support for the SMTP authentication methods DIGEST-MD5, CRAM-MD5, NTLM and LOGIN.
- Implemented feature request #10999: Added the possibility to refer to messages by their unique IDs in IMAP.
- Implemented feature request #11061: Added missing conditions for SMTP methods.
- Implemented feature request #11299: Added an optional argument to the setHeader() method in ezcMailPart to assign a charset to a header.
- Added the fetchSizes() method in IMAP which returns the sizes of the specified messages.
-
1.417 Dec 2007 -
1.3rc125 Jun 2007 -
1.3beta231 May 2007 -
1.302 Jul 2007 -
1.2beta220 Nov 2006Release notes
Open source →-
Added feature #9079: The ability to add mail attachments using streams.
-
Added feature #9100: The ability to set the character set in the composer for text and HTML parts.
-
Added feature #9331: Added the returnPath property in ezcMail to set the envelope address while sending mail with the SMTP and MTA transports.
-
Added feature #9334: Added the getMessageNumbers() method to the IMAP and POP3 sets to return message numbers. Patch by Mikko Koppanen.
-
Fixed an issue in ezcMailPart: When setting the headers property the wrong exception was thrown.
-
Fixed bug #9042: added __isset() method to classes that use properties.
-
Fixed bug #9442: added missing hasData() method to ezcMailVariableSet.
-
Various additions to the IMAP Transport:
- Added features #9171, #9172, #9206, #9228: Added the fetchByFlag(), countByFlag(), setFlag(), clearFlag() methods. Patches by Mikko Koppanen.
- Added feature #9173: Changed the status() method to also return the number of recent and unseen messages.
- Added features #9212 and #9228: Added the createMailbox(), renameMailbox(), deleteMailbox() and copyMessages() methods. Patches by Mikko Koppanen.
- Added feature #9229: Added a parameter to selectMailbox to select a mail box in readonly mode. Patch by Mikko Koppanen.
- Added feature #9333: Added the sortMessages(), sortFromOffset() and fetchFlags() methods. Patches by Mikko Koppanen.
- Added feature #9336: Added the expunge() method. Patch by Mikko Koppanen.
- Added feature #9423: Added the capability() method. Patch by Mikko Koppanen.
- Added feature #9424: Added the noop() method in IMAP and POP3 transports. Patch by Mikko Koppanen.
- Added feature #9425: Added the append() method.
-
-
1.2beta124 Oct 2006Release notes
Open source →- Added IMAP transport.
- Added fetchFromOffset() method to POP3 and MBOX transports.
- Implemented suggestion #8988: ezcMailAddress should implement __toString().
- Implemented suggestion #8989: Extending the ezcMail class. ezcMailParser->parse() can now deal with classes that extend ezcMail. Additionally, added this functionality to ezcMailTool::replyToMail().
- Implemented read access to property ezcMailPart->headers for extending this class and its derives.
- Added a new class (ezcMailVirtualFile) to allow attachments from memory.
- Added an optional parameter to listMessages() method in IMAP, to return messages with a certain Content-Type header.
-
1.218 Dec 2006 -
1.1rc129 May 2006Release notes
Open source →- Added the ezcMailTools::replyToMail() method that will create a reply message with the correct headers set (from, to, cc, ,subject, references and in-reply-to) based on an existing mail message.
- Added workaround for bug #8271: Mail parsing bug in email with PGP signature. We don't support GPG at the moment, however we now recognize it and ignore keys and signatures.
- Added the ezcMailSmtpTransport::keepConnection() method. This allows keeping the connection open when sending several mails.
- Added the ezcMail::messageID property which represents the ID of a mail message.
- Added the ezcMail::timestamp property which is generated from the Date header.
- Added the ezcMailMboxTransport and changed ezcMailMboxSet to work together with that one.
- Added $encoding parameter to ezcMailTools::parseMailAddress and ezcMailTools::parseMailAddresses. This allows you to parse not only RFC822 compliant address strings but also address strings in local encoding. This is useful when ezcMailAddress items directly from user inserted address string (e.g from a composer window).
- Added feature #8266: Property for the Content-Disposition stuff on the ezcMailPart level. Implemented for both parsing and sending.
- Changed mime string decoding to be more robust by trying to work around common mistakes by MUAs.
- Changed the way how character sets are handled. From now on all text parts will automatically be converted to UTF-8. The original character set belonging to the e-mail is stored in the originalCharset property, while the charset property will now always return "UTF-8" for text parts.
- Changed header storage so that headers are now stored case sensitive but retrieved case insensitive. This is useful since headers are case insensitive, but do have a preferred case. When fetching headers it is handy not to have to try all possible permutations.
- Fixed a bug where parsing would fail because there was no trailing ';' in the Content-Type field.
- Fixed an issue where mime decoding of headers failed because of a bug in PHP.
-
1.1beta209 May 2006Release notes
Open source →- Added the getRelatedPartByID() method to ezcMailMultipartRelated that returns a mail part by looking for it's Content-ID.
- Added the class ezcMailFileSet that can be used to parse mail messages in a file directly from disk.
- Added the class ezcMailVariableSet that can be used to parse mail messages directly from a variable.
- Changed the POP3 classes to leave the mail on the server by default. You need to actively set $deleteFromServer in order to have it removed.
-
1.1beta119 Apr 2006Release notes
Open source →- Added the mbox transport for reading mbox files to use with the ezcMailParser.
- Fixed a bug that caused filenames with spaces to appear mangled.
- Fixed a bug where the encodings 7bit and 8bit were not handled correctly.
- Fixed a bug where text attachments missed line breaks when saved to disk.
-
1.1alpha103 Apr 2006Release notes
Open source →- Added functionality for parsing mail messages. The main class is ezcMailParser.
- Added the POP 3 mail retrieving transport for use with the ezcMailParser.
- Added method ezcMailPart::setHeaders to set multiple headers at once.
- Added method ezcMailTools::parseEmailAddress and parseEmailAddresses that parse RFC 2822 email addresses.
- Added class ezcMailRfc822Digest inheriting ezcMailPart. This part can be used to create mail digest messages.
- Added class ezcMailMultipartDigest which represents multipart/digest parts.
- Renamed ezcMailTransportMta and ezcMailTransportSmtp to ezcMailMtaTransport and ezcMailSmtpTransport. The old classes still exist but are deprecated.
-
1.112 Jun 2006