Home » Mail » Mail
Class that provides multiple interfaces for sending emails
Download latest release 2.0.0 (there might be newer Composer installable version)
License: New BSD License
Description
PEAR's Mail package defines an interface for implementing mailers under the PEAR hierarchy. It also provides supporting functions useful to multiple mailer backends. Currently supported backends include: PHP's native mail() function, sendmail, and SMTP. This package also provides a RFC822 email address list validation utility class.
Documentation
Maintainers
- Armin Graefe (schengawegga) — lead, active
- Chuck Hagenbuch (chagenbu) — lead, inactive
- Richard Heyes (richard) — developer, inactive
- Aleksander Machniak (alec) — developer, inactive
Dependencies
Required
- PHP (>= 5.2.1)
- PEAR Installer (>= 1.5.6)
Optional
- Net_SMTP (>= 1.10.0)
Releases
- 2.0.0 (stable, 2024-01-15)
Release notes
License: New BSD License
* BugFix: Use CRLF for header separation, except sendmail, fixes #23 #24
- 1.6.0 (stable, 2023-11-01)
- 1.5.1 (stable, 2023-08-08)
- 1.5.0 (stable, 2022-11-29)
- 1.4.1 (stable, 2017-04-11)
- 1.4.0 (stable, 2017-04-07)
- 1.3.0 (stable, 2016-01-31)
- 1.2.0 (stable, 2010-03-01)
- 1.2.0b5 (beta, 2010-02-09)
- 1.2.0b4 (beta, 2010-02-08)
- 1.2.0b3 (beta, 2010-02-08)
- 1.2.0b2 (beta, 2009-05-15)
- 1.2.0b1 (beta, 2008-07-02)
- 1.2.0a2 (alpha, 2008-04-25)
- 1.2.0a1 (alpha, 2008-04-24)
- 1.1.14 (stable, 2006-10-11)
- 1.1.13 (stable, 2006-09-14)
- 1.1.12 (stable, 2006-09-13)
- 1.1.11 (stable, 2006-09-13)
- 1.1.10 (stable, 2006-04-26)
- 1.1.9 (stable, 2005-09-13)
- 1.1.8 (stable, 2005-08-24)
- 1.1.7 (stable, 2005-08-21)
- 1.1.6 (stable, 2005-07-12)
- 1.1.5 (stable, 2005-06-26)
- 1.1.4 (stable, 2004-09-08)
- 1.1.3 (stable, 2004-04-08)
- 1.1.2 (stable, 2003-09-05)
- 1.1.1 (stable, 2003-06-26)
- 1.1.0 (stable, 2003-06-21)
- 1.0.2 (stable, 2002-12-12)
- 1.0.1 (stable, 2002-07-27)
- 1.0 (stable, 2002-06-06)
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #19 | Closed | Bug | 2003-09-17 | Mail_mail::send() fails with safe mode switched on | |
| #268 | Duplicate | Bug | 2003-11-18 | Error handling trouble in Mail_RFC822::validateMailbox() | |
| #584 | Closed | Bug | 2004-01-15 | Mail::mail fails on PHP 4.2.2 | |
| #719 | Closed | Bug | 2004-02-09 | Output of MIME_RFC822::parseAddressList() wrong in some case | |
| #849 | Closed | Bug | 2004-02-24 | RFC822.php doesn't generate error for malformed addresses | |
| #856 | Closed | Bug | 2004-02-25 | Tripple Line Feed Error | |
| #1050 | Closed | Bug | 2004-03-22 | Missing EHLO/HELO string | |
| #1139 | Closed | Bug | 2004-04-05 | Always Fatal error: Cannot redeclare class mail in ...... | |
| #1222 | Closed | Bug | 2004-04-16 | Use of undefined constant PEAR_MAIL_FAILED | |
| #1289 | Closed | Bug | 2004-04-26 | Feature request: VERP style deliveries | |
| #1434 | Bogus | Bug | 2004-05-18 | parseAddressList won't parse unqualified addresses | |
| #1460 | Closed | Bug | 2004-05-20 | patch to handle multiple cc/bcc/etc. fields | |
| #1552 | Bogus | Bug | 2004-06-03 | Doesn't check for permissions of `sendmail'; but checks for ownership instead. | |
| #1563 | Closed | Bug | 2004-06-06 | Fatal error: Using $this when not in object context | |
| #1594 | No Feedback | Bug | 2004-06-09 | Recipient name containing dots makes sendmail return error code 67 | |
| #1869 | Closed | Bug | 2004-07-14 | invalid email address not recognized when validating | |
| #1881 | Closed | Bug | 2004-07-15 | Use of "is_executable" function in Sendmail driver | |
| #2046 | Closed | Bug | 2004-08-03 | error in documentation | |
| #2242 | No Feedback | Bug | 2004-08-27 | Error with UTF-8 Headers | |
| #2275 | Closed | Bug | 2004-09-03 | Address typo makes Mail_sendmail::send silently drop mail with no error | |
| #2476 | Bogus | Bug | 2004-10-07 | Mail Package: Bcc Header visible | |
| #2561 | Closed | Bug | 2004-10-18 | PEAR_MAIL_FAILED undefined constanst | |
| #2768 | Bogus | Bug | 2004-11-16 | Points in From are not validated | |
| #2931 | Closed | Bug | 2004-12-08 | _validateQuotedString() is too strict | |
| #3158 | Closed | Bug | 2005-01-10 | exit code for Mail::Sendmail->send not detected correctly | |
| #3291 | No Feedback | Bug | 2005-01-25 | Mail can not be sent | |
| #3301 | Bogus | Bug | 2005-01-26 | Mail can not be sent from CLI | |
| #3776 | Closed | Req | 2005-03-11 | smtp connect timeout would be swell | |
| #4122 | Closed | Req | 2005-04-11 | persistant smtp connections | |
| #4241 | Closed | Req | 2005-04-28 | More detailed error for SMTP mail | |
| #4636 | Closed | Bug | 2005-06-20 | send() fails with more than one 'Received' header | |
| #4705 | Wont fix | Bug | 2005-06-29 | smtp.php script should default to the server's SMTP setting in php.ini | |
| #4745 | Bogus | Bug | 2005-07-05 | Problem when using especias characters | |
| #4943 | Closed | Bug | 2005-07-29 | RFC822.php function isValidInetAddress noto working properly | |
| #5017 | Closed | Req | 2005-08-06 | Set envelope sender | |
| #5190 | Closed | Bug | 2005-08-23 | echo command in smtp.php 1.22 | |
| #5212 | Closed | Bug | 2005-08-26 | Mail_smtp should send RSET on error | |
| #5254 | Closed | Bug | 2005-08-31 | Mail_smpt::send echo's to screen | |
| #5372 | Closed | Bug | 2005-09-12 | 'persist' option, one error kills every call to send() afterwards | |
| #5388 | Closed | Req | 2005-09-13 | SMTPMX: MX baseddirect delivery | |
| #5857 | Bogus | Bug | 2005-11-03 | Cc mail aren't send | |
| #5970 | Bogus | Bug | 2005-11-15 | require_once('Mail.php'); | |
| #6023 | Bogus | Bug | 2005-11-21 | parseAddressList doesn't support new IDN names | |
| #6033 | Closed | Bug | 2005-11-22 | sendmail.php fails if open_basedir is set | |
| #6229 | Closed | Req | 2005-12-12 | Protection against mail injection | |
| #6590 | No Feedback | Bug | 2006-01-26 | No Sent Date on messages via SMTP | |
| #6648 | Bogus | Bug | 1.1.9 | 2006-01-31 | rfc822 problem during smtp conversation phase. |
| #6854 | Bogus | Req | 2006-02-21 | encoding spaces in mail subject | |
| #6983 | Closed | Req | 1.1.9 | 2006-03-01 | no codes generated for PEAR_Error |
| #7138 | Closed | Bug | 2006-03-16 | http://pear.php.net/manual/en/package.mail.mail-rfc822.parseaddresslist.php | |
| #7491 | Closed | Bug | 1.1.10 | 2006-04-26 | Mail::parseRecipients() not returning PEAR Error |
| #7492 | Closed | Bug | 1.1.10 | 2006-04-26 | Extra newline added before body |
| #7562 | Closed | Bug | 1.1.10 | 2006-05-05 | foo@bar.museum is rejected |
| #7616 | Closed | Bug | 2006-05-12 | nestGroups defaults to true, not false | |
| #7682 | Closed | Bug | 1.1.10 | 2006-05-20 | sendmail.php: constant PHP_EOL - assumed 'PHP_EOL' |
| #7694 | Bogus | Bug | 1.1.10 | 2006-05-22 | E_STRICT problem |
| #7785 | Closed | Bug | 1.1.10 | 2006-06-01 | sendmail driver needs '-i' in sendmail_args |
| #8047 | Bogus | Bug | 1.1.10 | 2006-06-28 | Cc and Bcc handling |
| #8379 | Bogus | Req | 1.1.10 | 2006-08-07 | Support no disconnect on SMTP send |
| #8543 | Closed | Bug | CVS | 2006-08-23 | Missing newline after headers when using sendmail |
| #8545 | Closed | Bug | 2006-08-23 | Bcc doesn't work | |
| #8685 | Closed | Bug | 1.1.11 | 2006-09-13 | Upgrade to 1.1.11 breaks email sending |
| #8688 | Closed | Bug | 1.1.12 | 2006-09-14 | Multiple-line-Header values breakup |
| #8699 | Closed | Bug | 1.1.12 | 2006-09-14 | slightly improved regex for header injection checking |
| #8705 | Bogus | Bug | 1.1.12 | 2006-09-14 | Using $this when not in object context |
| #8723 | Closed | Bug | 1.1.13 | 2006-09-17 | Missing trailing newline in headers with SMTP backend |
| #8724 | No Feedback | Bug | 1.1.13 | 2006-09-18 | _sanitizeHeaders removes boundary |
| #8818 | Open | Req | 1.1.13 | 2006-09-29 | Request Option to suppress email address validation (allow RFC OK fringe cases) |
| #8919 | Bogus | Req | 1.1.13 | 2006-10-09 | Return-Path setting |
| #8963 | Duplicate | Bug | 1.1.13 | 2006-10-11 | no newline between headers and body (reopen #8543) |
| #9137 | Closed | Bug | 1.1.14 | 2006-10-23 | _hasUnclosedQuotes() doesn't properly handle a double slash before an end quote |
| #9322 | No Feedback | Req | 1.1.14 | 2006-11-13 | SSL/TLS support |
| #9701 | Bogus | Bug | 1.1.14 | 2006-12-27 | PHP 5 Compatible Issues |
| #9810 | Bogus | Bug | 1.1.14 | 2007-01-12 | call to sanitizeHeaders fails |
| #9911 | Closed | Req | 1.1.14 | 2007-01-22 | Add support for SMTP PIPELINING (RFC 2920) |
| #9945 | Bogus | Bug | 1.1.14 | 2007-01-25 | Mail not compatible with stable release of Net_SMTP stable |
| #9947 | Closed | Bug | 1.1.14 | 2007-01-25 | Avoid some strict warnings |
| #9950 | Bogus | Bug | 2007-01-25 | PHP Strict errors even with E_STRICT Disabled | |
| #10305 | Closed | Bug | 1.1.14 | 2007-03-08 | Reopening of Bug #10298 |
| #10610 | Closed | Req | 2007-04-04 | Return Path not settable | |
| #10930 | Bogus | Bug | 1.1.14 | 2007-05-04 | bcc line not fully parsed if it contains \r\n |
| #11020 | Bogus | Req | 1.1.14 | 2007-05-11 | return path when using SMTP |
| #11093 | Closed | Req | 1.1.14 | 2007-05-22 | Bump to package.xml 2.0 |
| #11178 | Bogus | Bug | 1.1.14 | 2007-05-30 | parseAddressList doesn't allow .'s in names |
| #12071 | Closed | Bug | 1.1.14 | 2007-09-18 | Error message: Assigning the return value of new by reference is deprecated |
| #12186 | Closed | Bug | 1.1.14 | 2007-10-05 | _sanitizeHeaders() and prepareHeaders() do not check $headers on beeing array |
| #12478 | Open | Req | CVS | 2007-11-18 | hide PHP warnings, raised from PHP functions used in the class |
| #12557 | Open | Req | 1.1.14 | 2007-11-30 | Use mb_send_mail() if available |
| #12598 | Closed | Req | 1.1.14 | 2007-12-03 | Create a 'stub' mail driver |
| #12708 | Bogus | Bug | 1.1.14 | 2007-12-17 | RFC882 validation broken for certain From header |
| #12902 | Duplicate | Bug | 1.1.14 | 2008-01-14 | bcc recipients shown in the final email headers |
| #13587 | Open | Req | 1.1.14 | 2008-04-04 | relay params like "NOTIFY=SUCCESS,FAILURE" |
| #13659 | Closed | Bug | 1.1.14 | 2008-04-12 | Mail parse error in special condition |
| #13764 | Closed | Req | 1.1.14 | 2008-04-24 | Add addServiceExtensionParameter() |
| #13766 | Closed | Req | 1.1.14 | 2008-04-24 | Add method to obtain the Net_SMTP object |
| #13772 | Closed | Bug | 1.2.0a1 | 2008-04-25 | Fixes some issues with the new getSMTPObject code |
| #13931 | No Feedback | Bug | 1.2.0a2 | 2008-05-18 | Does not allow perfectly good 'From' address |
| #14807 | Bogus | Bug | 1.1.14 | 2008-10-16 | Failed "From" validation on Windows-1251 encoding |
| #14811 | Bogus | Bug | 2008-10-17 | Mail sent fail via smtp | |
| #15173 | Closed | Req | 1.1.14 | 2008-11-27 | Retrieve the "queued as" information |
| #15612 | Bogus | Bug | 1.1.14 | 2009-01-11 | Not able to send mail |
| #15620 | Closed | Doc | 1.2.0b1 | 2009-01-12 | Please update package license |
| #16067 | Closed | Req | 1.2.0b1 | 2009-04-03 | need to propogate the greeting sent by the server as retrieved by Net_SMTP |
| #16176 | Bogus | Bug | 1.2.0b1 | 2009-05-03 | 'Date' field not displaying correctly. |
| #16200 | Closed | Bug | 1.1.14 | 2009-05-07 | security hole allow to read/write Arbitrary File |
| #16318 | Bogus | Req | 1.2.0b2 | 2009-06-11 | SMTP: Retrieve response on successful send |
| #16432 | Closed | Req | 1.2.0b2 | 2009-07-12 | Would you release 1.2.0b2 as a stable, please. |
| #16805 | Bogus | Bug | 1.1.14 | 2009-11-19 | Install package doesn't include smtp.php |
| #16818 | Bogus | Bug | 1.2.0b2 | 2009-11-21 | Validation Failed Error when entering a dot in FROM Header |
| #16900 | Bogus | Bug | 1.1.14 | 2009-12-10 | Problem with PHP 5.3.0 |
| #16969 | Closed | Bug | 1.1.14 | 2010-01-05 | Deprecation warning |
| #17047 | Wont fix | Req | 1.2.0b2 | 2010-01-30 | Allow body text to be passed as resource to send() |
| #17178 | Closed | Bug | 1.2.0 | 2010-03-01 | Mail_RFC822::parseAddressList does not accept RFC-valid group syntax |
| #17317 | Closed | Bug | 1.2.0 | 2010-04-16 | Invalid periods in mailbox not marked as invalid |
| #17318 | Closed | Doc | 1.2.0 | 2010-04-17 | documentation lacking |
| #17391 | Duplicate | Req | 2010-05-12 | Deprecated return value by reference PHP 5.3.2 | |
| #17513 | Closed | Req | 1.2.0 | 2010-06-22 | passing tls parameter to SMTP driver and to NET_Smtp |
| #17553 | Closed | Bug | Unknown | 2010-07-02 | Error 8192 in Mail.php |
| #17758 | Open | Bug | 1.2.0 | 2010-08-20 | smtpmx driver not work for windows. |
| #17865 | Closed | Bug | 1.2.0 | 2010-09-14 | Mail hangs when "Allowed memory size of bytes exhausted" error using smtp |
| #17866 | Closed | Bug | 1.2.0 | 2010-09-14 | Non-static method Mail_RFC822::parseAddressList called statically |
| #17888 | Closed | Req | 1.2.0 | 2010-09-23 | Patch to reduce peak memory usage when using the smtp driver |
| #18109 | Closed | Bug | 1.2.0 | 2010-12-09 | New "pipelining" parameter for Mail SMTP never used |
| #18179 | No Feedback | Bug | 1.2.0 | 2011-01-07 | Mail::factory() then send crashes PHP |
| #18314 | Closed | Bug | 1.2.0 | 2011-02-25 | SMTP: Failed to connect socket: Permission denied (code: -1, response: ) |
| #18432 | Wont fix | Doc | 2011-04-12 | wrong user note | |
| #18573 | Open | Req | 1.2.0 | 2011-05-31 | MAIL FROM and From: can't be different? |
| #18607 | Duplicate | Bug | 1.2.0 | 2011-06-18 | Persist connection not always terminated as desired |
| #18766 | Open | Req | SVN | 2011-08-29 | SMTP error code is not available to user of smtp |
| #18820 | Duplicate | Bug | 1.2.0 | 2011-09-09 | Fatal Error: Assigning the return value of new by reference is deprecated |
| #19160 | Bogus | Bug | 1.2.0 | 2011-12-28 | fail to send two different mails from single script |
| #19456 | Duplicate | Bug | 1.2.0 | 2012-06-05 | exist ' &new Classname' call. |
| #19628 | Open | Req | 1.2.0 | 2012-10-01 | DKIM Signing No Work |
| #19911 | Bogus | Bug | 1.2.0 | 2013-04-25 | Missing method in Mail class |
| #19952 | Bogus | Bug | 1.2.0 | 2013-05-17 | Danish characters (æøå) in "From" differs from the "To" field. |
| #20370 | Closed | Bug | 1.2.0 | 2014-08-12 | Deprecation in Object instantiation |
| #20424 | Closed | Bug | SVN | 2014-10-08 | PHP Strict Standards |
| #20463 | Closed | Bug | 1.2.0 | 2014-12-13 | domain-literal parsing error |
| #20513 | Closed | Bug | 1.2.0 | 2015-03-08 | Mail_smtp::send() doesn't close socket for smtp connection |
| #21043 | Open | Req | 1.3.0 | 2016-03-22 | empty queued_as by pipelining |
| #21082 | Closed | Bug | SVN | 2016-06-16 | Inconsistent licensing |
| #21117 | Open | Bug | 1.3.0 | 2016-09-14 | Mitigate STRIPTLS Attack Vector |
| #21138 | Duplicate | Bug | 1.3.0 | 2016-10-25 | Unable to disable TLS |
| #21197 | Closed | Bug | 1.3.0 | 2017-03-25 | PHP 7 compatibility only needs &new changed to new |
| #21247 | Closed | Bug | 1.4.1 | 2017-10-09 | Depreciation Warnings |
| #29030 | Open | Doc | 2025-02-19 | User note that is a documentation problem |