Merge changes from Google Code 5.2.2 release, thanks Jim
Replace Quoted-Printable encoder, improve tests Reformat changelog using markdown Coding standards
This commit is contained in:
parent
f702e135de
commit
10c57b72fe
|
|
@ -1,16 +1,24 @@
|
||||||
ChangeLog
|
# ChangeLog
|
||||||
|
|
||||||
NOTE: THIS VERSION OF PHPMAILER IS DESIGNED FOR PHP5/PHP6.
|
* Add CRAM-MD5 authentication, thanks to Elijah madden, https://github.com/okonomiyaki3000
|
||||||
IT WILL NOT WORK WITH PHP4.
|
* Replacement of obsolete Quoted-Printable encoder with a much better implementation
|
||||||
|
* Composer package definition
|
||||||
Version 5.2.2-rc2 (November 6, 2012)
|
|
||||||
|
## Version 5.2.2 (December 3, 2012)
|
||||||
|
|
||||||
|
* Some fixes and syncs from https://github.com/Synchro/PHPMailer
|
||||||
|
* Add Slovak translation, thanks to Michal Tinka
|
||||||
|
|
||||||
|
## Version 5.2.2-rc2 (November 6, 2012)
|
||||||
|
|
||||||
* Fix SMTP server rotation (Bugz: 118)
|
* Fix SMTP server rotation (Bugz: 118)
|
||||||
* Allow override of autogen'ed 'Date' header (for Drupal's
|
* Allow override of autogen'ed 'Date' header (for Drupal's
|
||||||
og_mailinglist module)
|
og_mailinglist module)
|
||||||
* No whitespace after '-f' option (Bugz: 116)
|
* No whitespace after '-f' option (Bugz: 116)
|
||||||
* Work around potential warning (Bugz: 114)
|
* Work around potential warning (Bugz: 114)
|
||||||
|
|
||||||
Version 5.2.2-rc1 (September 28, 2012)
|
## Version 5.2.2-rc1 (September 28, 2012)
|
||||||
|
|
||||||
* Header encoding works with long lines (Bugz: 93)
|
* Header encoding works with long lines (Bugz: 93)
|
||||||
* Turkish language update (Bugz: 94)
|
* Turkish language update (Bugz: 94)
|
||||||
* undefined $pattern in EncodeQ bug squashed (Bugz: 98)
|
* undefined $pattern in EncodeQ bug squashed (Bugz: 98)
|
||||||
|
|
@ -20,7 +28,8 @@ Version 5.2.2-rc1 (September 28, 2012)
|
||||||
* ValidateAddress() no longer uses broken FILTER_VALIDATE_EMAIL
|
* ValidateAddress() no longer uses broken FILTER_VALIDATE_EMAIL
|
||||||
* Added in AUTH PLAIN SMTP authentication
|
* Added in AUTH PLAIN SMTP authentication
|
||||||
|
|
||||||
Version 5.2.2-beta2 (August 17, 2012)
|
## Version 5.2.2-beta2 (August 17, 2012)
|
||||||
|
|
||||||
* Fixed Postfix VERP support (Bugz: 92)
|
* Fixed Postfix VERP support (Bugz: 92)
|
||||||
* Allow action_function callbacks to pass/use
|
* Allow action_function callbacks to pass/use
|
||||||
the From address (passed as final param)
|
the From address (passed as final param)
|
||||||
|
|
@ -30,7 +39,8 @@ Version 5.2.2-beta2 (August 17, 2012)
|
||||||
compatible. (Bugz: 75)
|
compatible. (Bugz: 75)
|
||||||
* default setting for LE returned to "\n" due to popular demand.
|
* default setting for LE returned to "\n" due to popular demand.
|
||||||
|
|
||||||
Version 5.2.2-beta1 (July 13, 2012)
|
## Version 5.2.2-beta1 (July 13, 2012)
|
||||||
|
|
||||||
* Expose PreSend() and PostSend() as public methods to allow
|
* Expose PreSend() and PostSend() as public methods to allow
|
||||||
for more control if serializing message sending.
|
for more control if serializing message sending.
|
||||||
* GetSentMIMEMessage() only constructs the message copy when
|
* GetSentMIMEMessage() only constructs the message copy when
|
||||||
|
|
@ -54,25 +64,27 @@ Version 5.2.2-beta1 (July 13, 2012)
|
||||||
* Bugz closed: #68, #60, #42, #43, #59, #55, #66, #48, #49,
|
* Bugz closed: #68, #60, #42, #43, #59, #55, #66, #48, #49,
|
||||||
#52, #31, #41, #5. #70, #69
|
#52, #31, #41, #5. #70, #69
|
||||||
|
|
||||||
Version 5.2.1 (January 16, 2012)
|
## Version 5.2.1 (January 16, 2012)
|
||||||
|
|
||||||
* Closed several bugs#5
|
* Closed several bugs#5
|
||||||
* Performance improvements
|
* Performance improvements
|
||||||
* MsgHTML() now returns the message as required.
|
* MsgHTML() now returns the message as required.
|
||||||
* New method: GetSentMIMEMessage() (returns full copy of sent message)
|
* New method: GetSentMIMEMessage() (returns full copy of sent message)
|
||||||
|
|
||||||
Version 5.2 (July 19, 2011)
|
## Version 5.2 (July 19, 2011)
|
||||||
|
|
||||||
* protected MIME body and header
|
* protected MIME body and header
|
||||||
* better DKIM DNS Resource Record support
|
* better DKIM DNS Resource Record support
|
||||||
* better aly handling
|
* better aly handling
|
||||||
* htmlfilter class added to extras
|
* htmlfilter class added to extras
|
||||||
* moved to Apache Extras
|
* moved to Apache Extras
|
||||||
|
|
||||||
Version 5.1 (October 20, 2009)
|
## Version 5.1 (October 20, 2009)
|
||||||
|
|
||||||
* fixed filename issue with AddStringAttachment (thanks to Tony)
|
* fixed filename issue with AddStringAttachment (thanks to Tony)
|
||||||
* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in
|
* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in
|
||||||
addition to PHP mail()
|
addition to PHP mail()
|
||||||
* added DKIM digital signing functionality
|
* added DKIM digital signing functionality, new properties:
|
||||||
New properties:
|
|
||||||
- DKIM_domain (sets the domain name)
|
- DKIM_domain (sets the domain name)
|
||||||
- DKIM_private (holds DKIM private key)
|
- DKIM_private (holds DKIM private key)
|
||||||
- DKIM_passphrase (holds your DKIM passphrase)
|
- DKIM_passphrase (holds your DKIM passphrase)
|
||||||
|
|
@ -89,62 +101,70 @@ Version 5.1 (October 20, 2009)
|
||||||
- can be disabled:
|
- can be disabled:
|
||||||
- $mail->SetFrom('yourname@yourdomain.com','First Last',false);
|
- $mail->SetFrom('yourname@yourdomain.com','First Last',false);
|
||||||
- or by adding the $mail->Sender and/or $mail->ReplyTo properties
|
- or by adding the $mail->Sender and/or $mail->ReplyTo properties
|
||||||
Note: "auto" identity added to help with emails ending up in spam
|
|
||||||
or junk boxes because of missing headers
|
Note: "auto" identity added to help with emails ending up in spam or junk boxes because of missing headers
|
||||||
|
|
||||||
Version 5.0.2 (May 24, 2009)
|
## Version 5.0.2 (May 24, 2009)
|
||||||
|
|
||||||
* Fix for missing attachments when inline graphics are present
|
* Fix for missing attachments when inline graphics are present
|
||||||
* Fix for missing Cc in header when using SMTP (mail was sent,
|
* Fix for missing Cc in header when using SMTP (mail was sent,
|
||||||
but not displayed in header -- Cc receiver only saw email To:
|
but not displayed in header -- Cc receiver only saw email To:
|
||||||
line and no Cc line, but did get the email (To receiver
|
line and no Cc line, but did get the email (To receiver
|
||||||
saw same)
|
saw same)
|
||||||
|
|
||||||
Version 5.0.1 (April 05, 2009)
|
## Version 5.0.1 (April 05, 2009)
|
||||||
|
|
||||||
* Temporary fix for missing attachments
|
* Temporary fix for missing attachments
|
||||||
|
|
||||||
Version 5.0.0 (April 02, 2009)
|
## Version 5.0.0 (April 02, 2009)
|
||||||
|
|
||||||
* With the release of this version, we are initiating a new version numbering
|
* With the release of this version, we are initiating a new version numbering
|
||||||
system to differentiate from the PHP4 version of PHPMailer.
|
system to differentiate from the PHP4 version of PHPMailer.
|
||||||
* Most notable in this release is fully object oriented code.
|
* Most notable in this release is fully object oriented code.
|
||||||
class.smtp.php:
|
|
||||||
|
### class.smtp.php:
|
||||||
|
|
||||||
* Refactored class.smtp.php to support new exception handling
|
* Refactored class.smtp.php to support new exception handling
|
||||||
code size reduced from 29.2 Kb to 25.6 Kb
|
* code size reduced from 29.2 Kb to 25.6 Kb
|
||||||
* Removed unnecessary functions from class.smtp.php:
|
* Removed unnecessary functions from class.smtp.php:
|
||||||
public function Expand($name) {
|
- public function Expand($name) {
|
||||||
public function Help($keyword="") {
|
- public function Help($keyword="") {
|
||||||
public function Noop() {
|
- public function Noop() {
|
||||||
public function Send($from) {
|
- public function Send($from) {
|
||||||
public function SendOrMail($from) {
|
- public function SendOrMail($from) {
|
||||||
public function Verify($name) {
|
- public function Verify($name) {
|
||||||
class.phpmailer.php:
|
|
||||||
|
### class.phpmailer.php:
|
||||||
|
|
||||||
* Refactored class.phpmailer.php with new exception handling
|
* Refactored class.phpmailer.php with new exception handling
|
||||||
* Changed processing functionality of Sendmail and Qmail so they cannot be
|
* Changed processing functionality of Sendmail and Qmail so they cannot be
|
||||||
inadvertently used
|
inadvertently used
|
||||||
* removed getFile() function, just became a simple wrapper for
|
* removed getFile() function, just became a simple wrapper for
|
||||||
file_get_contents()
|
file_get_contents()
|
||||||
* added check for PHP version (will gracefully exit if not at least PHP 5.0)
|
* added check for PHP version (will gracefully exit if not at least PHP 5.0)
|
||||||
class.phpmailer.php enhancements
|
|
||||||
* enhanced code to check if an attachment source is the same as an embedded or
|
* enhanced code to check if an attachment source is the same as an embedded or
|
||||||
inline graphic source to eliminate duplicate attachments
|
inline graphic source to eliminate duplicate attachments
|
||||||
New /test_script
|
|
||||||
* We have written a test script you can use to test the script as part of your
|
### New /test_script
|
||||||
installation. Once you press submit, the test script will send a multi-mime
|
|
||||||
email with either the message you type in or an HTML email with an inline
|
We have written a test script you can use to test the script as part of your
|
||||||
graphic. Two attachments are included in the email (one of the attachments
|
installation. Once you press submit, the test script will send a multi-mime
|
||||||
is also the inline graphic so you can see that only one copy of the graphic
|
email with either the message you type in or an HTML email with an inline
|
||||||
is sent in the email). The test script will also display the functional
|
graphic. Two attachments are included in the email (one of the attachments
|
||||||
script that you can copy/paste to your editor to duplicate the functionality.
|
is also the inline graphic so you can see that only one copy of the graphic
|
||||||
New examples
|
is sent in the email). The test script will also display the functional
|
||||||
|
script that you can copy/paste to your editor to duplicate the functionality.
|
||||||
|
|
||||||
|
### New examples
|
||||||
|
|
||||||
* All new examples in both basic and advanced modes. Advanced examples show
|
* All new examples in both basic and advanced modes. Advanced examples show
|
||||||
Exception handling.
|
Exception handling.
|
||||||
PHPDocumentator (phpdocs) documentation for PHPMailer version 5.0.0
|
|
||||||
|
### PHPDocumentator (phpdocs) documentation for PHPMailer version 5.0.0
|
||||||
|
|
||||||
* all new documentation
|
* all new documentation
|
||||||
|
|
||||||
Please note: the website has been updated to reflect the changes in PHPMailer
|
## Version 2.3 (November 06, 2008)
|
||||||
Version 5.0.0. http://phpmailer.codeworxtech.com/
|
|
||||||
|
|
||||||
Version 2.3 (November 06, 2008)
|
|
||||||
|
|
||||||
* added Arabic language (many thanks to Bahjat Al Mostafa)
|
* added Arabic language (many thanks to Bahjat Al Mostafa)
|
||||||
* removed English language from language files and made it a default within
|
* removed English language from language files and made it a default within
|
||||||
|
|
@ -163,22 +183,20 @@ Version 2.3 (November 06, 2008)
|
||||||
* We have removed the /phpdoc from the downloads. All documentation is now on
|
* We have removed the /phpdoc from the downloads. All documentation is now on
|
||||||
the http://phpmailer.codeworxtech.com website.
|
the http://phpmailer.codeworxtech.com website.
|
||||||
|
|
||||||
Version 2.2.1 () July 19 2008
|
## Version 2.2.1 () July 19 2008
|
||||||
|
|
||||||
* fixed line 1092 in class.smtp.php (my apologies, error on my part)
|
* fixed line 1092 in class.smtp.php (my apologies, error on my part)
|
||||||
|
|
||||||
Version 2.2 () July 15 2008
|
## Version 2.2 () July 15 2008
|
||||||
|
|
||||||
* Fixed redirect issue (display of UTF-8 in thank you redirect)
|
* Fixed redirect issue (display of UTF-8 in thank you redirect)
|
||||||
* fixed error in getResponse function declaration (class.pop3.php)
|
* fixed error in getResponse function declaration (class.pop3.php)
|
||||||
* PHPMailer now PHP6 compliant
|
* PHPMailer now PHP6 compliant
|
||||||
* fixed line 1092 in class.smtp.php (endless loop from missing = sign)
|
* fixed line 1092 in class.smtp.php (endless loop from missing = sign)
|
||||||
|
|
||||||
Version 2.1 (Wed, June 04 2008)
|
## Version 2.1 (Wed, June 04 2008)
|
||||||
|
|
||||||
** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS.
|
NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE APPRECIATED.
|
||||||
IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE
|
|
||||||
APPRECIATED.
|
|
||||||
|
|
||||||
* added S/MIME functionality (ability to digitally sign emails)
|
* added S/MIME functionality (ability to digitally sign emails)
|
||||||
BIG THANKS TO "sergiocambra" for posting this patch back in November 2007.
|
BIG THANKS TO "sergiocambra" for posting this patch back in November 2007.
|
||||||
|
|
@ -195,15 +213,15 @@ Version 2.1 (Wed, June 04 2008)
|
||||||
directive, to your own server timezone
|
directive, to your own server timezone
|
||||||
- If you do get this error, and are unable to access your php.ini file:
|
- If you do get this error, and are unable to access your php.ini file:
|
||||||
In your PHP script, add
|
In your PHP script, add
|
||||||
date_default_timezone_set('America/Toronto');
|
`date_default_timezone_set('America/Toronto');`
|
||||||
- do not try to use
|
- do not try to use
|
||||||
$myVar = date_default_timezone_get();
|
`$myVar = date_default_timezone_get();`
|
||||||
as a test, it will throw an error.
|
as a test, it will throw an error.
|
||||||
* added ability to define path (mainly for embedded images)
|
* added ability to define path (mainly for embedded images)
|
||||||
function MsgHTML($message,$basedir='') ... where:
|
function `MsgHTML($message,$basedir='')` ... where:
|
||||||
$basedir is the fully qualified path
|
`$basedir` is the fully qualified path
|
||||||
* fixed MsgHTML() function:
|
* fixed `MsgHTML()` function:
|
||||||
- Embedded Images where images are specified by <protocol>:// will not be altered or embedded
|
- Embedded Images where images are specified by `<protocol>://` will not be altered or embedded
|
||||||
* fixed the return value of SMTP exit code ( pclose )
|
* fixed the return value of SMTP exit code ( pclose )
|
||||||
* addressed issue of multibyte characters in subject line and truncating
|
* addressed issue of multibyte characters in subject line and truncating
|
||||||
* added ability to have user specified Message ID
|
* added ability to have user specified Message ID
|
||||||
|
|
@ -213,21 +231,22 @@ Version 2.1 (Wed, June 04 2008)
|
||||||
* added check for added attachments
|
* added check for added attachments
|
||||||
* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny")
|
* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny")
|
||||||
|
|
||||||
Version 2.1.0beta2 (Sun, Dec 02 2007)
|
## Version 2.1.0beta2 (Sun, Dec 02 2007)
|
||||||
|
|
||||||
* implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon)
|
* implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon)
|
||||||
* finished all testing, all known bugs corrected, enhancements tested
|
* finished all testing, all known bugs corrected, enhancements tested
|
||||||
- note: will NOT work with PHP4.
|
- note: will NOT work with PHP4.
|
||||||
|
|
||||||
please note, this is BETA software
|
please note, this is BETA software **DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS; INTENDED STRICTLY FOR TESTING**
|
||||||
** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
|
|
||||||
|
## Version 2.1.0beta1
|
||||||
|
|
||||||
|
please note, this is BETA software
|
||||||
|
** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
|
||||||
INTENDED STRICTLY FOR TESTING
|
INTENDED STRICTLY FOR TESTING
|
||||||
|
|
||||||
Version 2.1.0beta1
|
## Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release
|
||||||
please note, this is BETA software
|
|
||||||
** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
|
|
||||||
INTENDED STRICTLY FOR TESTING
|
|
||||||
|
|
||||||
Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release
|
|
||||||
* implements new property to control VERP in class.smtp.php
|
* implements new property to control VERP in class.smtp.php
|
||||||
example (requires instantiating class.smtp.php):
|
example (requires instantiating class.smtp.php):
|
||||||
$mail->do_verp = true;
|
$mail->do_verp = true;
|
||||||
|
|
@ -259,7 +278,8 @@ Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release
|
||||||
less than your limit, and put a pause in your script.
|
less than your limit, and put a pause in your script.
|
||||||
*******************
|
*******************
|
||||||
|
|
||||||
Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release
|
## Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release
|
||||||
|
|
||||||
* dramatically simplified using inline graphics ... it's fully automated and requires no user input
|
* dramatically simplified using inline graphics ... it's fully automated and requires no user input
|
||||||
* added automatic document type detection for attachments and pictures
|
* added automatic document type detection for attachments and pictures
|
||||||
* added MsgHTML() function to replace Body tag for HTML emails
|
* added MsgHTML() function to replace Body tag for HTML emails
|
||||||
|
|
@ -271,12 +291,18 @@ Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release
|
||||||
* added Estonian language file by Indrek Päri
|
* added Estonian language file by Indrek Päri
|
||||||
* added header injection patch
|
* added header injection patch
|
||||||
* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc.
|
* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc.
|
||||||
|
|
||||||
|
```
|
||||||
example of use:
|
example of use:
|
||||||
$mail->set('X-Priority', '3');
|
$mail->set('X-Priority', '3');
|
||||||
$mail->set('X-MSMail-Priority', 'Normal');
|
$mail->set('X-MSMail-Priority', 'Normal');
|
||||||
|
```
|
||||||
|
|
||||||
* fixed warning message in SMTP get_lines method
|
* fixed warning message in SMTP get_lines method
|
||||||
* added TLS/SSL SMTP support
|
* added TLS/SSL SMTP support
|
||||||
example of use:
|
example of use:
|
||||||
|
|
||||||
|
```
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer();
|
||||||
$mail->Mailer = "smtp";
|
$mail->Mailer = "smtp";
|
||||||
$mail->Host = "smtp.example.com";
|
$mail->Host = "smtp.example.com";
|
||||||
|
|
@ -284,16 +310,20 @@ Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release
|
||||||
//$mail->SMTPSecure = "ssl"; // option
|
//$mail->SMTPSecure = "ssl"; // option
|
||||||
...
|
...
|
||||||
$mail->Send();
|
$mail->Send();
|
||||||
|
```
|
||||||
|
|
||||||
* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7)
|
* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7)
|
||||||
* Works with PHP installed as a module or as CGI-PHP
|
* Works with PHP installed as a module or as CGI-PHP
|
||||||
- NOTE: will NOT work with PHP5 in E_STRICT error mode
|
- NOTE: will NOT work with PHP5 in E_STRICT error mode
|
||||||
|
|
||||||
Version 1.73 (Sun, Jun 10 2005)
|
## Version 1.73 (Sun, Jun 10 2005)
|
||||||
|
|
||||||
* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf
|
* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf
|
||||||
* Now has a total of 20 translations
|
* Now has a total of 20 translations
|
||||||
* Fixed alt attachments bug: http://tinyurl.com/98u9k
|
* Fixed alt attachments bug: http://tinyurl.com/98u9k
|
||||||
|
|
||||||
Version 1.72 (Wed, May 25 2004)
|
## Version 1.72 (Wed, May 25 2004)
|
||||||
|
|
||||||
* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations.
|
* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations.
|
||||||
* Received: Removed this method because spam filter programs like
|
* Received: Removed this method because spam filter programs like
|
||||||
SpamAssassin reject this header.
|
SpamAssassin reject this header.
|
||||||
|
|
@ -301,7 +331,8 @@ Version 1.72 (Wed, May 25 2004)
|
||||||
* SetLanguage default is now "language/".
|
* SetLanguage default is now "language/".
|
||||||
* Fixed magic_quotes_runtime bug.
|
* Fixed magic_quotes_runtime bug.
|
||||||
|
|
||||||
Version 1.71 (Tue, Jul 28 2003)
|
## Version 1.71 (Tue, Jul 28 2003)
|
||||||
|
|
||||||
* Made several speed enhancements
|
* Made several speed enhancements
|
||||||
* Added German and Italian translation files
|
* Added German and Italian translation files
|
||||||
* Fixed HELO/AUTH bugs on keep-alive connects
|
* Fixed HELO/AUTH bugs on keep-alive connects
|
||||||
|
|
@ -310,7 +341,8 @@ Version 1.71 (Tue, Jul 28 2003)
|
||||||
* Updated some unclear documentation
|
* Updated some unclear documentation
|
||||||
* Added additional tests and improved others
|
* Added additional tests and improved others
|
||||||
|
|
||||||
Version 1.70 (Mon, Jun 20 2003)
|
## Version 1.70 (Mon, Jun 20 2003)
|
||||||
|
|
||||||
* Added SMTP keep-alive support
|
* Added SMTP keep-alive support
|
||||||
* Added IsError method for error detection
|
* Added IsError method for error detection
|
||||||
* Added error message translation support (SetLanguage)
|
* Added error message translation support (SetLanguage)
|
||||||
|
|
@ -330,20 +362,23 @@ Version 1.70 (Mon, Jun 20 2003)
|
||||||
* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC)
|
* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC)
|
||||||
* Multiple bug fixes
|
* Multiple bug fixes
|
||||||
|
|
||||||
Version 1.65 (Fri, Aug 09 2002)
|
## Version 1.65 (Fri, Aug 09 2002)
|
||||||
|
|
||||||
* Fixed non-visible attachment bug (#585097) for Outlook
|
* Fixed non-visible attachment bug (#585097) for Outlook
|
||||||
* SMTP connections are now closed after each transaction
|
* SMTP connections are now closed after each transaction
|
||||||
* Fixed SMTP::Expand return value
|
* Fixed SMTP::Expand return value
|
||||||
* Converted SMTP class documentation to phpDocumentor format
|
* Converted SMTP class documentation to phpDocumentor format
|
||||||
|
|
||||||
Version 1.62 (Wed, Jun 26 2002)
|
## Version 1.62 (Wed, Jun 26 2002)
|
||||||
|
|
||||||
* Fixed multi-attach bug
|
* Fixed multi-attach bug
|
||||||
* Set proper word wrapping
|
* Set proper word wrapping
|
||||||
* Reduced memory use with attachments
|
* Reduced memory use with attachments
|
||||||
* Added more debugging
|
* Added more debugging
|
||||||
* Changed documentation to phpDocumentor format
|
* Changed documentation to phpDocumentor format
|
||||||
|
|
||||||
Version 1.60 (Sat, Mar 30 2002)
|
## Version 1.60 (Sat, Mar 30 2002)
|
||||||
|
|
||||||
* Sendmail pipe and address patch (Christian Holtje)
|
* Sendmail pipe and address patch (Christian Holtje)
|
||||||
* Added embedded image and read confirmation support (A. Ognio)
|
* Added embedded image and read confirmation support (A. Ognio)
|
||||||
* Added unit tests
|
* Added unit tests
|
||||||
|
|
@ -354,21 +389,25 @@ Version 1.60 (Sat, Mar 30 2002)
|
||||||
* Eliminated SMTP class warnings
|
* Eliminated SMTP class warnings
|
||||||
* Added SendToQueue method for future queuing support
|
* Added SendToQueue method for future queuing support
|
||||||
|
|
||||||
Version 1.54 (Wed, Dec 19 2001)
|
## Version 1.54 (Wed, Dec 19 2001)
|
||||||
|
|
||||||
* Add some queuing support code
|
* Add some queuing support code
|
||||||
* Fixed a pesky multi/alt bug
|
* Fixed a pesky multi/alt bug
|
||||||
* Messages are no longer forced to have "To" addresses
|
* Messages are no longer forced to have "To" addresses
|
||||||
|
|
||||||
Version 1.50 (Thu, Nov 08 2001)
|
## Version 1.50 (Thu, Nov 08 2001)
|
||||||
|
|
||||||
* Fix extra lines when not using SMTP mailer
|
* Fix extra lines when not using SMTP mailer
|
||||||
* Set WordWrap variable to int with a zero default
|
* Set WordWrap variable to int with a zero default
|
||||||
|
|
||||||
Version 1.47 (Tue, Oct 16 2001)
|
## Version 1.47 (Tue, Oct 16 2001)
|
||||||
|
|
||||||
* Fixed Received header code format
|
* Fixed Received header code format
|
||||||
* Fixed AltBody order error
|
* Fixed AltBody order error
|
||||||
* Fixed alternate port warning
|
* Fixed alternate port warning
|
||||||
|
|
||||||
Version 1.45 (Tue, Sep 25 2001)
|
## Version 1.45 (Tue, Sep 25 2001)
|
||||||
|
|
||||||
* Added enhanced SMTP debug support
|
* Added enhanced SMTP debug support
|
||||||
* Added support for multiple ports on SMTP
|
* Added support for multiple ports on SMTP
|
||||||
* Added Received header for tracing
|
* Added Received header for tracing
|
||||||
|
|
@ -377,42 +416,51 @@ Version 1.45 (Tue, Sep 25 2001)
|
||||||
* Fixed wordwrap() trim bug
|
* Fixed wordwrap() trim bug
|
||||||
* Couple other small bug fixes
|
* Couple other small bug fixes
|
||||||
|
|
||||||
Version 1.41 (Wed, Aug 22 2001)
|
## Version 1.41 (Wed, Aug 22 2001)
|
||||||
|
|
||||||
* Fixed AltBody bug w/o attachments
|
* Fixed AltBody bug w/o attachments
|
||||||
* Fixed rfc_date() for certain mail servers
|
* Fixed rfc_date() for certain mail servers
|
||||||
|
|
||||||
Version 1.40 (Sun, Aug 12 2001)
|
## Version 1.40 (Sun, Aug 12 2001)
|
||||||
|
|
||||||
* Added multipart/alternative support (AltBody)
|
* Added multipart/alternative support (AltBody)
|
||||||
* Documentation update
|
* Documentation update
|
||||||
* Fixed bug in Mercury MTA
|
* Fixed bug in Mercury MTA
|
||||||
|
|
||||||
Version 1.29 (Fri, Aug 03 2001)
|
## Version 1.29 (Fri, Aug 03 2001)
|
||||||
|
|
||||||
* Added AddStringAttachment() method
|
* Added AddStringAttachment() method
|
||||||
* Added SMTP authentication support
|
* Added SMTP authentication support
|
||||||
|
|
||||||
Version 1.28 (Mon, Jul 30 2001)
|
## Version 1.28 (Mon, Jul 30 2001)
|
||||||
|
|
||||||
* Fixed a typo in SMTP class
|
* Fixed a typo in SMTP class
|
||||||
* Fixed header issue with Imail (win32) SMTP server
|
* Fixed header issue with Imail (win32) SMTP server
|
||||||
* Made fopen() calls for attachments use "rb" to fix win32 error
|
* Made fopen() calls for attachments use "rb" to fix win32 error
|
||||||
|
|
||||||
Version 1.25 (Mon, Jul 02 2001)
|
## Version 1.25 (Mon, Jul 02 2001)
|
||||||
|
|
||||||
* Added RFC 822 date fix (Patrice)
|
* Added RFC 822 date fix (Patrice)
|
||||||
* Added improved error handling by adding a $ErrorInfo variable
|
* Added improved error handling by adding a $ErrorInfo variable
|
||||||
* Removed MailerDebug variable (obsolete with new error handler)
|
* Removed MailerDebug variable (obsolete with new error handler)
|
||||||
|
|
||||||
Version 1.20 (Mon, Jun 25 2001)
|
## Version 1.20 (Mon, Jun 25 2001)
|
||||||
|
|
||||||
* Added quoted-printable encoding (Patrice)
|
* Added quoted-printable encoding (Patrice)
|
||||||
* Set Version as public and removed PrintVersion()
|
* Set Version as public and removed PrintVersion()
|
||||||
* Changed phpdoc to only display public variables and methods
|
* Changed phpdoc to only display public variables and methods
|
||||||
|
|
||||||
Version 1.19 (Thu, Jun 21 2001)
|
## Version 1.19 (Thu, Jun 21 2001)
|
||||||
|
|
||||||
* Fixed MS Mail header bug
|
* Fixed MS Mail header bug
|
||||||
* Added fix for Bcc problem with mail(). *Does not work on Win32*
|
* Added fix for Bcc problem with mail(). *Does not work on Win32*
|
||||||
(See PHP bug report: http://www.php.net/bugs.php?id=11616)
|
(See PHP bug report: http://www.php.net/bugs.php?id=11616)
|
||||||
* mail() no longer passes a fifth parameter when not needed
|
* mail() no longer passes a fifth parameter when not needed
|
||||||
|
|
||||||
Version 1.15 (Fri, Jun 15 2001)
|
## Version 1.15 (Fri, Jun 15 2001)
|
||||||
[Note: these changes contributed by Patrice Fournier]
|
|
||||||
|
Note: these changes contributed by Patrice Fournier
|
||||||
|
|
||||||
* Changed all remaining \n to \r\n
|
* Changed all remaining \n to \r\n
|
||||||
* Bcc: header no longer writen to message except
|
* Bcc: header no longer writen to message except
|
||||||
when sent directly to sendmail
|
when sent directly to sendmail
|
||||||
|
|
@ -427,34 +475,42 @@ Version 1.15 (Fri, Jun 15 2001)
|
||||||
* Can set Encoding to base64 to send 8 bits body
|
* Can set Encoding to base64 to send 8 bits body
|
||||||
through 7 bits servers
|
through 7 bits servers
|
||||||
|
|
||||||
Version 1.10 (Tue, Jun 12 2001)
|
## Version 1.10 (Tue, Jun 12 2001)
|
||||||
|
|
||||||
* Fixed win32 mail header bug (printed out headers in message body)
|
* Fixed win32 mail header bug (printed out headers in message body)
|
||||||
|
|
||||||
Version 1.09 (Fri, Jun 08 2001)
|
## Version 1.09 (Fri, Jun 08 2001)
|
||||||
|
|
||||||
* Changed date header to work with Netscape mail programs
|
* Changed date header to work with Netscape mail programs
|
||||||
* Altered phpdoc documentation
|
* Altered phpdoc documentation
|
||||||
|
|
||||||
Version 1.08 (Tue, Jun 05 2001)
|
## Version 1.08 (Tue, Jun 05 2001)
|
||||||
|
|
||||||
* Added enhanced error-checking
|
* Added enhanced error-checking
|
||||||
* Added phpdoc documentation to source
|
* Added phpdoc documentation to source
|
||||||
|
|
||||||
Version 1.06 (Fri, Jun 01 2001)
|
## Version 1.06 (Fri, Jun 01 2001)
|
||||||
|
|
||||||
* Added optional name for file attachments
|
* Added optional name for file attachments
|
||||||
|
|
||||||
Version 1.05 (Tue, May 29 2001)
|
## Version 1.05 (Tue, May 29 2001)
|
||||||
|
|
||||||
* Code cleanup
|
* Code cleanup
|
||||||
* Eliminated sendmail header warning message
|
* Eliminated sendmail header warning message
|
||||||
* Fixed possible SMTP error
|
* Fixed possible SMTP error
|
||||||
|
|
||||||
Version 1.03 (Thu, May 24 2001)
|
## Version 1.03 (Thu, May 24 2001)
|
||||||
|
|
||||||
* Fixed problem where qmail sends out duplicate messages
|
* Fixed problem where qmail sends out duplicate messages
|
||||||
|
|
||||||
Version 1.02 (Wed, May 23 2001)
|
## Version 1.02 (Wed, May 23 2001)
|
||||||
|
|
||||||
* Added multiple recipient and attachment Clear* methods
|
* Added multiple recipient and attachment Clear* methods
|
||||||
* Added Sendmail public variable
|
* Added Sendmail public variable
|
||||||
* Fixed problem with loading SMTP library multiple times
|
* Fixed problem with loading SMTP library multiple times
|
||||||
|
|
||||||
Version 0.98 (Tue, May 22 2001)
|
## Version 0.98 (Tue, May 22 2001)
|
||||||
|
|
||||||
* Fixed problem with redundant mail hosts sending out multiple messages
|
* Fixed problem with redundant mail hosts sending out multiple messages
|
||||||
* Added additional error handler code
|
* Added additional error handler code
|
||||||
* Added AddCustomHeader() function
|
* Added AddCustomHeader() function
|
||||||
|
|
@ -462,11 +518,13 @@ Version 0.98 (Tue, May 22 2001)
|
||||||
* Fixed small bug with Mailer variable
|
* Fixed small bug with Mailer variable
|
||||||
* Added PrintVersion() function
|
* Added PrintVersion() function
|
||||||
|
|
||||||
Version 0.92 (Tue, May 15 2001)
|
## Version 0.92 (Tue, May 15 2001)
|
||||||
|
|
||||||
* Changed file names to class.phpmailer.php and class.smtp.php to match
|
* Changed file names to class.phpmailer.php and class.smtp.php to match
|
||||||
current PHP class trend.
|
current PHP class trend.
|
||||||
* Fixed problem where body not being printed when a message is attached
|
* Fixed problem where body not being printed when a message is attached
|
||||||
* Several small bug fixes
|
* Several small bug fixes
|
||||||
|
|
||||||
Version 0.90 (Tue, April 17 2001)
|
## Version 0.90 (Tue, April 17 2001)
|
||||||
* Intial public release
|
|
||||||
|
* Initial public release
|
||||||
|
|
@ -390,7 +390,7 @@ class PHPMailer {
|
||||||
* Sets the PHPMailer Version number
|
* Sets the PHPMailer Version number
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.2-rc2';
|
public $Version = '5.2.2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* What to use in the X-Mailer header
|
* What to use in the X-Mailer header
|
||||||
|
|
@ -1073,8 +1073,7 @@ class PHPMailer {
|
||||||
|
|
||||||
$connection = true;
|
$connection = true;
|
||||||
if ($this->SMTPAuth) {
|
if ($this->SMTPAuth) {
|
||||||
if (!$this->smtp->Authenticate($this->Username, $this->Password, $this->AuthType,
|
if (!$this->smtp->Authenticate($this->Username, $this->Password, $this->AuthType, $this->Realm, $this->Workstation)) {
|
||||||
$this->Realm, $this->Workstation)) {
|
|
||||||
throw new phpmailerException($this->Lang('authenticate'));
|
throw new phpmailerException($this->Lang('authenticate'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1086,7 +1085,7 @@ class PHPMailer {
|
||||||
}
|
}
|
||||||
} catch (phpmailerException $e) {
|
} catch (phpmailerException $e) {
|
||||||
$this->smtp->Reset();
|
$this->smtp->Reset();
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2017,37 +2016,35 @@ class PHPMailer {
|
||||||
return $encoded;
|
return $encoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Encode string to quoted-printable.
|
|
||||||
* Only uses standard PHP, slow, but will always work
|
|
||||||
* @access public
|
|
||||||
* @param string $string
|
|
||||||
* @param integer $line_max Number of chars allowed on a line before wrapping
|
|
||||||
* @return string
|
|
||||||
* @link Adapted from http://fr2.php.net/manual/en/function.quoted-printable-decode.php#89417
|
|
||||||
*/
|
|
||||||
function EncodeQPphp($string, $line_max = 76) {
|
|
||||||
$string = str_replace(array('%20', '%0D%0A.', '%0D%0A', '%'), array(' ', "\r\n=2E", "\r\n", '='), rawurlencode($string));
|
|
||||||
$string = preg_replace('/[^\r\n]{'.($line_max - 3).'}[^=\r\n]{2}/', "$0=\r\n", $string);
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode string to RFC2045 (6.7) quoted-printable format
|
* Encode string to RFC2045 (6.7) quoted-printable format
|
||||||
* Uses a PHP5 stream filter to do the encoding about 64x faster than the old version
|
|
||||||
* Also results in same content as you started with after decoding
|
|
||||||
* @see EncodeQPphp()
|
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $string the text to encode
|
* @param string $string The text to encode
|
||||||
* @param integer $line_max Number of chars allowed on a line before wrapping
|
* @param integer $line_max Number of chars allowed on a line before wrapping
|
||||||
* @return string
|
* @return string
|
||||||
* @author Marcus Bointon
|
* @link PHP version adapted from http://www.php.net/manual/en/function.quoted-printable-decode.php#89417
|
||||||
*/
|
*/
|
||||||
public function EncodeQP($string, $line_max = 76) {
|
public function EncodeQP($string, $line_max = 76) {
|
||||||
if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3)
|
if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3)
|
||||||
return quoted_printable_encode($string);
|
return quoted_printable_encode($string);
|
||||||
}
|
}
|
||||||
return $this->EncodeQPphp($string, $line_max); //Fall back to php implementation
|
//Fall back to a pure PHP implementation
|
||||||
|
$string = str_replace(array('%20', '%0D%0A.', '%0D%0A', '%'), array(' ', "\r\n=2E", "\r\n", '='), rawurlencode($string));
|
||||||
|
$string = preg_replace('/[^\r\n]{'.($line_max - 3).'}[^=\r\n]{2}/', "$0=\r\n", $string);
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper to preserve BC for old QP encoding function that was removed
|
||||||
|
* @see EncodeQP()
|
||||||
|
* @access public
|
||||||
|
* @param string $string
|
||||||
|
* @param integer $line_max
|
||||||
|
* @param bool $space_conv
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function EncodeQPphp($string, $line_max = 76, $space_conv = false) {
|
||||||
|
return $this->EncodeQP($string, $line_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2116,17 +2113,17 @@ class PHPMailer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an embedded attachment. This can include images, sounds, and
|
* Add an embedded attachment from a file.
|
||||||
* just about any other document. Make sure to set the $type to an
|
* This can include images, sounds, and just about any other document type.
|
||||||
* image type. For JPEG images use "image/jpeg" and for GIF images
|
* Be sure to set the $type to an image type for images:
|
||||||
* use "image/gif".
|
* JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.
|
||||||
* @param string $path Path to the attachment.
|
* @param string $path Path to the attachment.
|
||||||
* @param string $cid Content ID of the attachment. Use this to identify
|
* @param string $cid Content ID of the attachment; Use this to reference
|
||||||
* the Id for accessing the image in an HTML form.
|
* the content when using an embedded image in HTML.
|
||||||
* @param string $name Overrides the attachment name.
|
* @param string $name Overrides the attachment name.
|
||||||
* @param string $encoding File encoding (see $Encoding).
|
* @param string $encoding File encoding (see $Encoding).
|
||||||
* @param string $type File extension (MIME) type.
|
* @param string $type File MIME type.
|
||||||
* @return bool
|
* @return bool True on successfully adding an attachment
|
||||||
*/
|
*/
|
||||||
public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
||||||
|
|
||||||
|
|
@ -2151,17 +2148,22 @@ class PHPMailer {
|
||||||
6 => 'inline',
|
6 => 'inline',
|
||||||
7 => $cid
|
7 => $cid
|
||||||
);
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an embedded image from a binary string, e.g. one loaded with file_get_contents or generated with gd
|
* Add an embedded stringified attachment.
|
||||||
* @param string $string Binary image data
|
* This can include images, sounds, and just about any other document type.
|
||||||
* @param string $cid Content identifier
|
* Be sure to set the $type to an image type for images:
|
||||||
* @param string $filename
|
* JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'.
|
||||||
* @param string $encoding
|
* @param string $string The attachment binary data.
|
||||||
* @param string $type
|
* @param string $cid Content ID of the attachment; Use this to reference
|
||||||
|
* the content when using an embedded image in HTML.
|
||||||
|
* @param string $filename A name for the attachment
|
||||||
|
* @param string $encoding File encoding (see $Encoding).
|
||||||
|
* @param string $type MIME type.
|
||||||
|
* @return bool True on successfully adding an attachment
|
||||||
*/
|
*/
|
||||||
public function AddStringEmbeddedImage($string, $cid, $filename = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
public function AddStringEmbeddedImage($string, $cid, $filename = '', $encoding = 'base64', $type = 'application/octet-stream') {
|
||||||
// Append to $attachment array
|
// Append to $attachment array
|
||||||
|
|
@ -2175,6 +2177,7 @@ class PHPMailer {
|
||||||
6 => 'inline',
|
6 => 'inline',
|
||||||
7 => $cid
|
7 => $cid
|
||||||
);
|
);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ class POP3 {
|
||||||
* Sets the POP3 PHPMailer Version number
|
* Sets the POP3 PHPMailer Version number
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.2-rc2';
|
public $Version = '5.2.2';
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
// PROPERTIES, PRIVATE AND PROTECTED
|
// PROPERTIES, PRIVATE AND PROTECTED
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
/*~ class.smtp.php
|
/*~ class.smtp.php
|
||||||
.---------------------------------------------------------------------------.
|
.---------------------------------------------------------------------------.
|
||||||
| Software: PHPMailer - PHP email class |
|
| Software: PHPMailer - PHP email class |
|
||||||
| Version: 5.2.1 |
|
| Version: 5.2.2 |
|
||||||
| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ |
|
| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ |
|
||||||
| ------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------- |
|
||||||
| Admin: Jim Jagielski (project admininistrator) |
|
| Admin: Jim Jagielski (project admininistrator) |
|
||||||
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
|
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
|
||||||
| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
|
| : Marcus Bointon (coolbru) phpmailer@synchromedia.co.uk |
|
||||||
| : Jim Jagielski (jimjag) jimjag@gmail.com |
|
| : Jim Jagielski (jimjag) jimjag@gmail.com |
|
||||||
| Founder: Brent R. Matzelle (original founder) |
|
| Founder: Brent R. Matzelle (original founder) |
|
||||||
| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved. |
|
| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved. |
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
* @author Jim Jagielski
|
* @author Jim Jagielski
|
||||||
* @copyright 2010 - 2012 Jim Jagielski
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
|
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
|
||||||
* @version $Id: class.smtp.php 450 2010-06-23 16:46:33Z coolbru $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -58,7 +57,7 @@ class SMTP {
|
||||||
public $CRLF = "\r\n";
|
public $CRLF = "\r\n";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets debug output level; 0 for no output
|
* Debug output level; 0 for no output
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $do_debug = 0;
|
public $do_debug = 0;
|
||||||
|
|
@ -92,7 +91,7 @@ class SMTP {
|
||||||
* Sets the SMTP PHPMailer Version number
|
* Sets the SMTP PHPMailer Version number
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.2-rc2';
|
public $Version = '5.2.2';
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
// PROPERTIES, PRIVATE AND PROTECTED
|
// PROPERTIES, PRIVATE AND PROTECTED
|
||||||
|
|
@ -364,7 +363,7 @@ class SMTP {
|
||||||
** How to telnet in windows: http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx
|
** How to telnet in windows: http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx
|
||||||
** PROTOCOL Documentation http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication
|
** PROTOCOL Documentation http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication
|
||||||
*/
|
*/
|
||||||
require_once('ntlm_sasl_client.php');
|
require_once 'ntlm_sasl_client.php';
|
||||||
$temp = new stdClass();
|
$temp = new stdClass();
|
||||||
$ntlm_client = new ntlm_sasl_client_class;
|
$ntlm_client = new ntlm_sasl_client_class;
|
||||||
if(! $ntlm_client->Initialize($temp)){//let's test if every function its available
|
if(! $ntlm_client->Initialize($temp)){//let's test if every function its available
|
||||||
|
|
@ -393,9 +392,9 @@ class SMTP {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$challange = substr($rply,3);//though 0 based, there is a white space after the 3 digit number....//msg2
|
$challenge = substr($rply,3);//though 0 based, there is a white space after the 3 digit number....//msg2
|
||||||
$challange = base64_decode($challange);
|
$challenge = base64_decode($challenge);
|
||||||
$ntlm_res = $ntlm_client->NTLMResponse(substr($challange,24,8),$password);
|
$ntlm_res = $ntlm_client->NTLMResponse(substr($challenge,24,8),$password);
|
||||||
$msg3 = $ntlm_client->TypeMsg3($ntlm_res,$username,$realm,$workstation);//msg3
|
$msg3 = $ntlm_client->TypeMsg3($ntlm_res,$username,$realm,$workstation);//msg3
|
||||||
// Send encoded username
|
// Send encoded username
|
||||||
fputs($this->smtp_conn, base64_encode($msg3) . $this->CRLF);
|
fputs($this->smtp_conn, base64_encode($msg3) . $this->CRLF);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* Slovak Version
|
||||||
|
* Author: Michal Tinka <michaltinka@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: ';
|
||||||
|
|
@ -179,7 +179,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
$ReportBody .= $bullet_start;
|
$ReportBody .= $bullet_start;
|
||||||
for ($i = 0; $i < count($this->ChangeLog); $i++) {
|
for ($i = 0; $i < count($this->ChangeLog); $i++) {
|
||||||
$ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" .
|
$ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" .
|
||||||
$this->ChangeLog[$i][1] . "]" . $eol;
|
$this->ChangeLog[$i][1] . "]" . $eol;
|
||||||
}
|
}
|
||||||
$ReportBody .= $bullet_end . $eol . $eol;
|
$ReportBody .= $bullet_end . $eol . $eol;
|
||||||
}
|
}
|
||||||
|
|
@ -284,332 +284,333 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
// UNIT TESTS
|
// UNIT TESTS
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test CRAM-MD5 authentication
|
* Test CRAM-MD5 authentication
|
||||||
* Needs a connection to a server that supports this auth mechanism, so commented out by default
|
* Needs a connection to a server that supports this auth mechanism, so commented out by default
|
||||||
*/
|
*/
|
||||||
function testAuthCRAMMD5()
|
function testAuthCRAMMD5()
|
||||||
{
|
{
|
||||||
$this->Mail->Host = 'hostname';
|
$this->Mail->Host = 'hostname';
|
||||||
$this->Mail->Port = 587;
|
$this->Mail->Port = 587;
|
||||||
$this->Mail->SMTPAuth = true;
|
$this->Mail->SMTPAuth = true;
|
||||||
$this->Mail->SMTPSecure = 'tls';
|
$this->Mail->SMTPSecure = 'tls';
|
||||||
$this->Mail->AuthType = 'CRAM-MD5';
|
$this->Mail->AuthType = 'CRAM-MD5';
|
||||||
$this->Mail->Username = 'username';
|
$this->Mail->Username = 'username';
|
||||||
$this->Mail->Password = 'password';
|
$this->Mail->Password = 'password';
|
||||||
$this->Mail->Body = 'Test body';
|
$this->Mail->Body = 'Test body';
|
||||||
$this->Mail->Subject .= ": Auth CRAM-MD5";
|
$this->Mail->Subject .= ": Auth CRAM-MD5";
|
||||||
$this->Mail->From = 'from@example.com';
|
$this->Mail->From = 'from@example.com';
|
||||||
$this->Mail->Sender = 'from@example.com';
|
$this->Mail->Sender = 'from@example.com';
|
||||||
$this->Mail->ClearAllRecipients();
|
$this->Mail->ClearAllRecipients();
|
||||||
$this->Mail->AddAddress('user@example.com');
|
$this->Mail->AddAddress('user@example.com');
|
||||||
//$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
|
//$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test email address validation
|
* Test email address validation
|
||||||
* Test addresses obtained from http://isemail.info
|
* Test addresses obtained from http://isemail.info
|
||||||
* Some failing cases commented out, mostly not significant though
|
* Some failing cases commented out, mostly not significant though
|
||||||
*/
|
*/
|
||||||
function testValidate()
|
function testValidate()
|
||||||
{
|
{
|
||||||
$validaddresses = array(
|
$validaddresses = array(
|
||||||
'first@iana.org',
|
'first@iana.org',
|
||||||
'first.last@iana.org',
|
'first.last@iana.org',
|
||||||
'1234567890123456789012345678901234567890123456789012345678901234@iana.org',
|
'1234567890123456789012345678901234567890123456789012345678901234@iana.org',
|
||||||
'"first\"last"@iana.org',
|
'"first\"last"@iana.org',
|
||||||
'"first@last"@iana.org',
|
'"first@last"@iana.org',
|
||||||
'"first\last"@iana.org',
|
'"first\last"@iana.org',
|
||||||
'first.last@[12.34.56.78]',
|
'first.last@[12.34.56.78]',
|
||||||
'first.last@[IPv6:::12.34.56.78]',
|
'first.last@[IPv6:::12.34.56.78]',
|
||||||
// 'first.last@[IPv6:1111:2222:3333::4444:12.34.56.78]',
|
// 'first.last@[IPv6:1111:2222:3333::4444:12.34.56.78]',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.56.78]',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.56.78]',
|
||||||
'first.last@[IPv6:::1111:2222:3333:4444:5555:6666]',
|
'first.last@[IPv6:::1111:2222:3333:4444:5555:6666]',
|
||||||
'first.last@[IPv6:1111:2222:3333::4444:5555:6666]',
|
'first.last@[IPv6:1111:2222:3333::4444:5555:6666]',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:6666::]',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:6666::]',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]',
|
||||||
'first.last@x23456789012345678901234567890123456789012345678901234567890123.iana.org',
|
'first.last@x23456789012345678901234567890123456789012345678901234567890123.iana.org',
|
||||||
'first.last@3com.com',
|
'first.last@3com.com',
|
||||||
'first.last@123.iana.org',
|
'first.last@123.iana.org',
|
||||||
'"first\last"@iana.org',
|
'"first\last"@iana.org',
|
||||||
// 'first.last@[IPv6:1111:2222:3333::4444:5555:12.34.56.78]',
|
// 'first.last@[IPv6:1111:2222:3333::4444:5555:12.34.56.78]',
|
||||||
// 'first.last@[IPv6:1111:2222:3333::4444:5555:6666:7777]',
|
// 'first.last@[IPv6:1111:2222:3333::4444:5555:6666:7777]',
|
||||||
'first.last@example.123',
|
'first.last@example.123',
|
||||||
'first.last@com',
|
'first.last@com',
|
||||||
'"Abc\@def"@iana.org',
|
'"Abc\@def"@iana.org',
|
||||||
'"Fred\ Bloggs"@iana.org',
|
'"Fred\ Bloggs"@iana.org',
|
||||||
'"Joe.\Blow"@iana.org',
|
'"Joe.\Blow"@iana.org',
|
||||||
'"Abc@def"@iana.org',
|
'"Abc@def"@iana.org',
|
||||||
'"Fred Bloggs"@iana.org',
|
'"Fred Bloggs"@iana.org',
|
||||||
'user+mailbox@iana.org',
|
'user+mailbox@iana.org',
|
||||||
'customer/department=shipping@iana.org',
|
'customer/department=shipping@iana.org',
|
||||||
'$A12345@iana.org',
|
'$A12345@iana.org',
|
||||||
'!def!xyz%abc@iana.org',
|
'!def!xyz%abc@iana.org',
|
||||||
'_somename@iana.org',
|
'_somename@iana.org',
|
||||||
'dclo@us.ibm.com',
|
'dclo@us.ibm.com',
|
||||||
'peter.piper@iana.org',
|
'peter.piper@iana.org',
|
||||||
'"Doug \"Ace\" L."@iana.org',
|
'"Doug \"Ace\" L."@iana.org',
|
||||||
'test@iana.org',
|
'test@iana.org',
|
||||||
'TEST@iana.org',
|
'TEST@iana.org',
|
||||||
'1234567890@iana.org',
|
'1234567890@iana.org',
|
||||||
'test+test@iana.org',
|
'test+test@iana.org',
|
||||||
'test-test@iana.org',
|
'test-test@iana.org',
|
||||||
't*est@iana.org',
|
't*est@iana.org',
|
||||||
'+1~1+@iana.org',
|
'+1~1+@iana.org',
|
||||||
'{_test_}@iana.org',
|
'{_test_}@iana.org',
|
||||||
'"[[ test ]]"@iana.org',
|
'"[[ test ]]"@iana.org',
|
||||||
'test.test@iana.org',
|
'test.test@iana.org',
|
||||||
'"test.test"@iana.org',
|
'"test.test"@iana.org',
|
||||||
'test."test"@iana.org',
|
'test."test"@iana.org',
|
||||||
'"test@test"@iana.org',
|
'"test@test"@iana.org',
|
||||||
'test@123.123.123.x123',
|
'test@123.123.123.x123',
|
||||||
'test@123.123.123.123',
|
'test@123.123.123.123',
|
||||||
'test@[123.123.123.123]',
|
'test@[123.123.123.123]',
|
||||||
'test@example.iana.org',
|
'test@example.iana.org',
|
||||||
'test@example.example.iana.org',
|
'test@example.example.iana.org',
|
||||||
'"test\test"@iana.org',
|
'"test\test"@iana.org',
|
||||||
'test@example',
|
'test@example',
|
||||||
'"test\blah"@iana.org',
|
'"test\blah"@iana.org',
|
||||||
'"test\blah"@iana.org',
|
'"test\blah"@iana.org',
|
||||||
'"test\"blah"@iana.org',
|
'"test\"blah"@iana.org',
|
||||||
'customer/department@iana.org',
|
'customer/department@iana.org',
|
||||||
'_Yosemite.Sam@iana.org',
|
'_Yosemite.Sam@iana.org',
|
||||||
'~@iana.org',
|
'~@iana.org',
|
||||||
'"Austin@Powers"@iana.org',
|
'"Austin@Powers"@iana.org',
|
||||||
'Ima.Fool@iana.org',
|
'Ima.Fool@iana.org',
|
||||||
'"Ima.Fool"@iana.org',
|
'"Ima.Fool"@iana.org',
|
||||||
'"Ima Fool"@iana.org',
|
'"Ima Fool"@iana.org',
|
||||||
'"first"."last"@iana.org',
|
'"first"."last"@iana.org',
|
||||||
'"first".middle."last"@iana.org',
|
'"first".middle."last"@iana.org',
|
||||||
'"first".last@iana.org',
|
'"first".last@iana.org',
|
||||||
'first."last"@iana.org',
|
'first."last"@iana.org',
|
||||||
'"first"."middle"."last"@iana.org',
|
'"first"."middle"."last"@iana.org',
|
||||||
'"first.middle"."last"@iana.org',
|
'"first.middle"."last"@iana.org',
|
||||||
'"first.middle.last"@iana.org',
|
'"first.middle.last"@iana.org',
|
||||||
'"first..last"@iana.org',
|
'"first..last"@iana.org',
|
||||||
// '"first\\\"last"@iana.org',
|
// '"first\\\"last"@iana.org',
|
||||||
'first."mid\dle"."last"@iana.org',
|
'first."mid\dle"."last"@iana.org',
|
||||||
'"test blah"@iana.org',
|
'"test blah"@iana.org',
|
||||||
// '(foo)cal(bar)@(baz)iamcal.com(quux)',
|
// '(foo)cal(bar)@(baz)iamcal.com(quux)',
|
||||||
// 'cal@iamcal(woo).(yay)com',
|
// 'cal@iamcal(woo).(yay)com',
|
||||||
// 'cal(woo(yay)hoopla)@iamcal.com',
|
// 'cal(woo(yay)hoopla)@iamcal.com',
|
||||||
// 'cal(foo\@bar)@iamcal.com',
|
// 'cal(foo\@bar)@iamcal.com',
|
||||||
// 'cal(foo\)bar)@iamcal.com',
|
// 'cal(foo\)bar)@iamcal.com',
|
||||||
// 'first().last@iana.org',
|
// 'first().last@iana.org',
|
||||||
// 'pete(his account)@silly.test(his host)',
|
// 'pete(his account)@silly.test(his host)',
|
||||||
// 'c@(Chris\'s host.)public.example',
|
// 'c@(Chris\'s host.)public.example',
|
||||||
// 'jdoe@machine(comment). example',
|
// 'jdoe@machine(comment). example',
|
||||||
// '1234 @ local(blah) .machine .example',
|
// '1234 @ local(blah) .machine .example',
|
||||||
'first(abc.def).last@iana.org',
|
'first(abc.def).last@iana.org',
|
||||||
'first(a"bc.def).last@iana.org',
|
'first(a"bc.def).last@iana.org',
|
||||||
'first.(")middle.last(")@iana.org',
|
'first.(")middle.last(")@iana.org',
|
||||||
'first(abc\(def)@iana.org',
|
'first(abc\(def)@iana.org',
|
||||||
'first.last@x(1234567890123456789012345678901234567890123456789012345678901234567890).com',
|
'first.last@x(1234567890123456789012345678901234567890123456789012345678901234567890).com',
|
||||||
'a(a(b(c)d(e(f))g)h(i)j)@iana.org',
|
'a(a(b(c)d(e(f))g)h(i)j)@iana.org',
|
||||||
'name.lastname@domain.com',
|
'name.lastname@domain.com',
|
||||||
'a@b',
|
'a@b',
|
||||||
'a@bar.com',
|
'a@bar.com',
|
||||||
'aaa@[123.123.123.123]',
|
'aaa@[123.123.123.123]',
|
||||||
'a@bar',
|
'a@bar',
|
||||||
'a-b@bar.com',
|
'a-b@bar.com',
|
||||||
'+@b.c',
|
'+@b.c',
|
||||||
'+@b.com',
|
'+@b.com',
|
||||||
'a@b.co-foo.uk',
|
'a@b.co-foo.uk',
|
||||||
'"hello my name is"@stutter.com',
|
'"hello my name is"@stutter.com',
|
||||||
'"Test \"Fail\" Ing"@iana.org',
|
'"Test \"Fail\" Ing"@iana.org',
|
||||||
'valid@about.museum',
|
'valid@about.museum',
|
||||||
'shaitan@my-domain.thisisminekthx',
|
'shaitan@my-domain.thisisminekthx',
|
||||||
'foobar@192.168.0.1',
|
'foobar@192.168.0.1',
|
||||||
'"Joe\Blow"@iana.org',
|
'"Joe\Blow"@iana.org',
|
||||||
'HM2Kinsists@(that comments are allowed)this.is.ok',
|
'HM2Kinsists@(that comments are allowed)this.is.ok',
|
||||||
'user%uucp!path@berkeley.edu',
|
'user%uucp!path@berkeley.edu',
|
||||||
'first.last @iana.org',
|
'first.last @iana.org',
|
||||||
'cdburgess+!#$%&\'*-/=?+_{}|~test@gmail.com',
|
'cdburgess+!#$%&\'*-/=?+_{}|~test@gmail.com',
|
||||||
// 'first.last@[IPv6:::a2:a3:a4:b1:b2:b3:b4]',
|
// 'first.last@[IPv6:::a2:a3:a4:b1:b2:b3:b4]',
|
||||||
// 'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3::]',
|
// 'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3::]',
|
||||||
'first.last@[IPv6:::]',
|
'first.last@[IPv6:::]',
|
||||||
'first.last@[IPv6:::b4]',
|
'first.last@[IPv6:::b4]',
|
||||||
'first.last@[IPv6:::b3:b4]',
|
'first.last@[IPv6:::b3:b4]',
|
||||||
'first.last@[IPv6:a1::b4]',
|
'first.last@[IPv6:a1::b4]',
|
||||||
'first.last@[IPv6:a1::]',
|
'first.last@[IPv6:a1::]',
|
||||||
'first.last@[IPv6:a1:a2::]',
|
'first.last@[IPv6:a1:a2::]',
|
||||||
'first.last@[IPv6:0123:4567:89ab:cdef::]',
|
'first.last@[IPv6:0123:4567:89ab:cdef::]',
|
||||||
'first.last@[IPv6:0123:4567:89ab:CDEF::]',
|
'first.last@[IPv6:0123:4567:89ab:CDEF::]',
|
||||||
'first.last@[IPv6:::a3:a4:b1:ffff:11.22.33.44]',
|
'first.last@[IPv6:::a3:a4:b1:ffff:11.22.33.44]',
|
||||||
// 'first.last@[IPv6:::a2:a3:a4:b1:ffff:11.22.33.44]',
|
// 'first.last@[IPv6:::a2:a3:a4:b1:ffff:11.22.33.44]',
|
||||||
'first.last@[IPv6:a1:a2:a3:a4::11.22.33.44]',
|
'first.last@[IPv6:a1:a2:a3:a4::11.22.33.44]',
|
||||||
// 'first.last@[IPv6:a1:a2:a3:a4:b1::11.22.33.44]',
|
// 'first.last@[IPv6:a1:a2:a3:a4:b1::11.22.33.44]',
|
||||||
'first.last@[IPv6:a1::11.22.33.44]',
|
'first.last@[IPv6:a1::11.22.33.44]',
|
||||||
'first.last@[IPv6:a1:a2::11.22.33.44]',
|
'first.last@[IPv6:a1:a2::11.22.33.44]',
|
||||||
'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.44]',
|
'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.44]',
|
||||||
'first.last@[IPv6:0123:4567:89ab:CDEF::11.22.33.44]',
|
'first.last@[IPv6:0123:4567:89ab:CDEF::11.22.33.44]',
|
||||||
'first.last@[IPv6:a1::b2:11.22.33.44]',
|
'first.last@[IPv6:a1::b2:11.22.33.44]',
|
||||||
'test@test.com',
|
'test@test.com',
|
||||||
'test@xn--example.com',
|
'test@xn--example.com',
|
||||||
'test@example.com');
|
'test@example.com'
|
||||||
$invalidaddresses = array(
|
);
|
||||||
'first.last@sub.do,com',
|
$invalidaddresses = array(
|
||||||
'first\@last@iana.org',
|
'first.last@sub.do,com',
|
||||||
'123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234 [...]',
|
'first\@last@iana.org',
|
||||||
'first.last',
|
'123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234 [...]',
|
||||||
'12345678901234567890123456789012345678901234567890123456789012345@iana.org',
|
'first.last',
|
||||||
'.first.last@iana.org',
|
'12345678901234567890123456789012345678901234567890123456789012345@iana.org',
|
||||||
'first.last.@iana.org',
|
'.first.last@iana.org',
|
||||||
'first..last@iana.org',
|
'first.last.@iana.org',
|
||||||
'"first"last"@iana.org',
|
'first..last@iana.org',
|
||||||
// '"""@iana.org',
|
'"first"last"@iana.org',
|
||||||
'"\"@iana.org',
|
// '"""@iana.org',
|
||||||
// '""@iana.org',
|
'"\"@iana.org',
|
||||||
'first\@last@iana.org',
|
// '""@iana.org',
|
||||||
'first.last@',
|
'first\@last@iana.org',
|
||||||
'x@x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23 [...]',
|
'first.last@',
|
||||||
'first.last@[.12.34.56.78]',
|
'x@x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23 [...]',
|
||||||
'first.last@[12.34.56.789]',
|
'first.last@[.12.34.56.78]',
|
||||||
'first.last@[::12.34.56.78]',
|
'first.last@[12.34.56.789]',
|
||||||
'first.last@[IPv5:::12.34.56.78]',
|
'first.last@[::12.34.56.78]',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:12.34.56.78]',
|
'first.last@[IPv5:::12.34.56.78]',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:12.34.56.78]',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:12.34.56.78]',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777]',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:12.34.56.78]',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777]',
|
||||||
'first.last@[IPv6:1111:2222::3333::4444:5555:6666]',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]',
|
||||||
'first.last@[IPv6:1111:2222:333x::4444:5555]',
|
'first.last@[IPv6:1111:2222::3333::4444:5555:6666]',
|
||||||
'first.last@[IPv6:1111:2222:33333::4444:5555]',
|
'first.last@[IPv6:1111:2222:333x::4444:5555]',
|
||||||
'first.last@-xample.com',
|
'first.last@[IPv6:1111:2222:33333::4444:5555]',
|
||||||
'first.last@exampl-.com',
|
'first.last@-xample.com',
|
||||||
'first.last@x234567890123456789012345678901234567890123456789012345678901234.iana.org',
|
'first.last@exampl-.com',
|
||||||
'abc\@def@iana.org',
|
'first.last@x234567890123456789012345678901234567890123456789012345678901234.iana.org',
|
||||||
'abc\@iana.org',
|
'abc\@def@iana.org',
|
||||||
'Doug\ \"Ace\"\ Lovell@iana.org',
|
'abc\@iana.org',
|
||||||
'abc@def@iana.org',
|
'Doug\ \"Ace\"\ Lovell@iana.org',
|
||||||
'abc\@def@iana.org',
|
'abc@def@iana.org',
|
||||||
'abc\@iana.org',
|
'abc\@def@iana.org',
|
||||||
'@iana.org',
|
'abc\@iana.org',
|
||||||
'doug@',
|
'@iana.org',
|
||||||
'"qu@iana.org',
|
'doug@',
|
||||||
'ote"@iana.org',
|
'"qu@iana.org',
|
||||||
'.dot@iana.org',
|
'ote"@iana.org',
|
||||||
'dot.@iana.org',
|
'.dot@iana.org',
|
||||||
'two..dot@iana.org',
|
'dot.@iana.org',
|
||||||
'"Doug "Ace" L."@iana.org',
|
'two..dot@iana.org',
|
||||||
'Doug\ \"Ace\"\ L\.@iana.org',
|
'"Doug "Ace" L."@iana.org',
|
||||||
'hello world@iana.org',
|
'Doug\ \"Ace\"\ L\.@iana.org',
|
||||||
'gatsby@f.sc.ot.t.f.i.tzg.era.l.d.',
|
'hello world@iana.org',
|
||||||
'test.iana.org',
|
'gatsby@f.sc.ot.t.f.i.tzg.era.l.d.',
|
||||||
'test.@iana.org',
|
'test.iana.org',
|
||||||
'test..test@iana.org',
|
'test.@iana.org',
|
||||||
'.test@iana.org',
|
'test..test@iana.org',
|
||||||
'test@test@iana.org',
|
'.test@iana.org',
|
||||||
'test@@iana.org',
|
'test@test@iana.org',
|
||||||
'-- test --@iana.org',
|
'test@@iana.org',
|
||||||
'[test]@iana.org',
|
'-- test --@iana.org',
|
||||||
'"test"test"@iana.org',
|
'[test]@iana.org',
|
||||||
'()[]\;:,><@iana.org',
|
'"test"test"@iana.org',
|
||||||
'test@.',
|
'()[]\;:,><@iana.org',
|
||||||
'test@example.',
|
'test@.',
|
||||||
'test@.org',
|
'test@example.',
|
||||||
'test@1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 [...]',
|
'test@.org',
|
||||||
'test@[123.123.123.123',
|
'test@1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 [...]',
|
||||||
'test@123.123.123.123]',
|
'test@[123.123.123.123',
|
||||||
'NotAnEmail',
|
'test@123.123.123.123]',
|
||||||
'@NotAnEmail',
|
'NotAnEmail',
|
||||||
'"test"blah"@iana.org',
|
'@NotAnEmail',
|
||||||
'.wooly@iana.org',
|
'"test"blah"@iana.org',
|
||||||
'wo..oly@iana.org',
|
'.wooly@iana.org',
|
||||||
'pootietang.@iana.org',
|
'wo..oly@iana.org',
|
||||||
'.@iana.org',
|
'pootietang.@iana.org',
|
||||||
'Ima Fool@iana.org',
|
'.@iana.org',
|
||||||
'phil.h\@\@ck@haacked.com',
|
'Ima Fool@iana.org',
|
||||||
'foo@[\1.2.3.4]',
|
'phil.h\@\@ck@haacked.com',
|
||||||
// 'first."".last@iana.org',
|
'foo@[\1.2.3.4]',
|
||||||
'first\last@iana.org',
|
// 'first."".last@iana.org',
|
||||||
'Abc\@def@iana.org',
|
'first\last@iana.org',
|
||||||
'Fred\ Bloggs@iana.org',
|
'Abc\@def@iana.org',
|
||||||
'Joe.\Blow@iana.org',
|
'Fred\ Bloggs@iana.org',
|
||||||
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.567.89]',
|
'Joe.\Blow@iana.org',
|
||||||
'{^c\@**Dog^}@cartoon.com',
|
'first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.567.89]',
|
||||||
// '"foo"(yay)@(hoopla)[1.2.3.4]',
|
'{^c\@**Dog^}@cartoon.com',
|
||||||
'cal(foo(bar)@iamcal.com',
|
// '"foo"(yay)@(hoopla)[1.2.3.4]',
|
||||||
'cal(foo)bar)@iamcal.com',
|
'cal(foo(bar)@iamcal.com',
|
||||||
'cal(foo\)@iamcal.com',
|
'cal(foo)bar)@iamcal.com',
|
||||||
'first(12345678901234567890123456789012345678901234567890)last@(123456789012345678901234567890123456789012 [...]',
|
'cal(foo\)@iamcal.com',
|
||||||
'first(middle)last@iana.org',
|
'first(12345678901234567890123456789012345678901234567890)last@(123456789012345678901234567890123456789012 [...]',
|
||||||
'first(abc("def".ghi).mno)middle(abc("def".ghi).mno).last@(abc("def".ghi).mno)example(abc("def".ghi).mno). [...]',
|
'first(middle)last@iana.org',
|
||||||
'a(a(b(c)d(e(f))g)(h(i)j)@iana.org',
|
'first(abc("def".ghi).mno)middle(abc("def".ghi).mno).last@(abc("def".ghi).mno)example(abc("def".ghi).mno). [...]',
|
||||||
'.@',
|
'a(a(b(c)d(e(f))g)(h(i)j)@iana.org',
|
||||||
'@bar.com',
|
'.@',
|
||||||
'@@bar.com',
|
'@bar.com',
|
||||||
'aaa.com',
|
'@@bar.com',
|
||||||
'aaa@.com',
|
'aaa.com',
|
||||||
'aaa@.123',
|
'aaa@.com',
|
||||||
'aaa@[123.123.123.123]a',
|
'aaa@.123',
|
||||||
'aaa@[123.123.123.333]',
|
'aaa@[123.123.123.123]a',
|
||||||
'a@bar.com.',
|
'aaa@[123.123.123.333]',
|
||||||
'a@-b.com',
|
'a@bar.com.',
|
||||||
'a@b-.com',
|
'a@-b.com',
|
||||||
'-@..com',
|
'a@b-.com',
|
||||||
'-@a..com',
|
'-@..com',
|
||||||
'invalid@about.museum-',
|
'-@a..com',
|
||||||
'test@...........com',
|
'invalid@about.museum-',
|
||||||
// '"Unicode NULL "@char.com',
|
'test@...........com',
|
||||||
'Unicode NULL @char.com',
|
// '"Unicode NULL "@char.com',
|
||||||
'first.last@[IPv6::]',
|
'Unicode NULL @char.com',
|
||||||
'first.last@[IPv6::::]',
|
'first.last@[IPv6::]',
|
||||||
'first.last@[IPv6::b4]',
|
'first.last@[IPv6::::]',
|
||||||
'first.last@[IPv6::::b4]',
|
'first.last@[IPv6::b4]',
|
||||||
'first.last@[IPv6::b3:b4]',
|
'first.last@[IPv6::::b4]',
|
||||||
'first.last@[IPv6::::b3:b4]',
|
'first.last@[IPv6::b3:b4]',
|
||||||
'first.last@[IPv6:a1:::b4]',
|
'first.last@[IPv6::::b3:b4]',
|
||||||
'first.last@[IPv6:a1:]',
|
'first.last@[IPv6:a1:::b4]',
|
||||||
'first.last@[IPv6:a1:::]',
|
'first.last@[IPv6:a1:]',
|
||||||
'first.last@[IPv6:a1:a2:]',
|
'first.last@[IPv6:a1:::]',
|
||||||
'first.last@[IPv6:a1:a2:::]',
|
'first.last@[IPv6:a1:a2:]',
|
||||||
'first.last@[IPv6::11.22.33.44]',
|
'first.last@[IPv6:a1:a2:::]',
|
||||||
'first.last@[IPv6::::11.22.33.44]',
|
'first.last@[IPv6::11.22.33.44]',
|
||||||
'first.last@[IPv6:a1:11.22.33.44]',
|
'first.last@[IPv6::::11.22.33.44]',
|
||||||
'first.last@[IPv6:a1:::11.22.33.44]',
|
'first.last@[IPv6:a1:11.22.33.44]',
|
||||||
'first.last@[IPv6:a1:a2:::11.22.33.44]',
|
'first.last@[IPv6:a1:::11.22.33.44]',
|
||||||
'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.xx]',
|
'first.last@[IPv6:a1:a2:::11.22.33.44]',
|
||||||
'first.last@[IPv6:0123:4567:89ab:CDEFF::11.22.33.44]',
|
'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.xx]',
|
||||||
'first.last@[IPv6:a1::a4:b1::b4:11.22.33.44]',
|
'first.last@[IPv6:0123:4567:89ab:CDEFF::11.22.33.44]',
|
||||||
'first.last@[IPv6:a1::11.22.33]',
|
'first.last@[IPv6:a1::a4:b1::b4:11.22.33.44]',
|
||||||
'first.last@[IPv6:a1::11.22.33.44.55]',
|
'first.last@[IPv6:a1::11.22.33]',
|
||||||
'first.last@[IPv6:a1::b211.22.33.44]',
|
'first.last@[IPv6:a1::11.22.33.44.55]',
|
||||||
'first.last@[IPv6:a1::b2::11.22.33.44]',
|
'first.last@[IPv6:a1::b211.22.33.44]',
|
||||||
'first.last@[IPv6:a1::b3:]',
|
'first.last@[IPv6:a1::b2::11.22.33.44]',
|
||||||
'first.last@[IPv6::a2::b4]',
|
'first.last@[IPv6:a1::b3:]',
|
||||||
'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3:]',
|
'first.last@[IPv6::a2::b4]',
|
||||||
'first.last@[IPv6::a2:a3:a4:b1:b2:b3:b4]',
|
'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3:]',
|
||||||
'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]'
|
'first.last@[IPv6::a2:a3:a4:b1:b2:b3:b4]',
|
||||||
);
|
'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]'
|
||||||
$goodfails = array();
|
);
|
||||||
foreach ($validaddresses as $address) {
|
$goodfails = array();
|
||||||
if (!PHPMailer::ValidateAddress($address)) {
|
foreach ($validaddresses as $address) {
|
||||||
$goodfails[] = $address;
|
if (!PHPMailer::ValidateAddress($address)) {
|
||||||
//"Valid address <$address> failed validation"
|
$goodfails[] = $address;
|
||||||
}
|
//"Valid address <$address> failed validation"
|
||||||
}
|
}
|
||||||
$badpasses = array();
|
}
|
||||||
foreach ($invalidaddresses as $address) {
|
$badpasses = array();
|
||||||
if (PHPMailer::ValidateAddress($address)) {
|
foreach ($invalidaddresses as $address) {
|
||||||
$badpasses[] = $address;
|
if (PHPMailer::ValidateAddress($address)) {
|
||||||
}
|
$badpasses[] = $address;
|
||||||
}
|
}
|
||||||
$err = '';
|
}
|
||||||
if (count($goodfails) > 0) {
|
$err = '';
|
||||||
$err .= "Good addreses that failed validation:\n";
|
if (count($goodfails) > 0) {
|
||||||
$err .= implode("\n", $goodfails);
|
$err .= "Good addreses that failed validation:\n";
|
||||||
}
|
$err .= implode("\n", $goodfails);
|
||||||
if (count($badpasses) > 0) {
|
}
|
||||||
if (!empty($err)) {
|
if (count($badpasses) > 0) {
|
||||||
$err .="\n\n";
|
if (!empty($err)) {
|
||||||
}
|
$err .= "\n\n";
|
||||||
$err .= "Bad addreses that passed validation:\n";
|
}
|
||||||
$err .= implode("\n", $badpasses);
|
$err .= "Bad addreses that passed validation:\n";
|
||||||
}
|
$err .= implode("\n", $badpasses);
|
||||||
$this->assertEmpty($err, $err);
|
}
|
||||||
}
|
$this->assertEmpty($err, $err);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try a plain message.
|
* Try a plain message.
|
||||||
*/
|
*/
|
||||||
function test_WordWrap()
|
function test_WordWrap()
|
||||||
|
|
@ -617,8 +618,8 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->Mail->WordWrap = 40;
|
$this->Mail->WordWrap = 40;
|
||||||
$my_body = "Here is the main body of this message. It should " .
|
$my_body = "Here is the main body of this message. It should " .
|
||||||
"be quite a few lines. It should be wrapped at the " .
|
"be quite a few lines. It should be wrapped at the " .
|
||||||
"40 characters. Make sure that it is.";
|
"40 characters. Make sure that it is.";
|
||||||
$nBodyLen = strlen($my_body);
|
$nBodyLen = strlen($my_body);
|
||||||
$my_body .= "\n\nThis is the above body length: " . $nBodyLen;
|
$my_body .= "\n\nThis is the above body length: " . $nBodyLen;
|
||||||
|
|
||||||
|
|
@ -637,7 +638,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->Mail->Priority = 5;
|
$this->Mail->Priority = 5;
|
||||||
$this->Mail->Body = "Here is the main body. There should be " .
|
$this->Mail->Body = "Here is the main body. There should be " .
|
||||||
"a reply to address in this message.";
|
"a reply to address in this message.";
|
||||||
$this->Mail->Subject .= ": Low Priority";
|
$this->Mail->Subject .= ": Low Priority";
|
||||||
$this->Mail->AddReplyTo("nobody@nobody.com", "Nobody (Unit Test)");
|
$this->Mail->AddReplyTo("nobody@nobody.com", "Nobody (Unit Test)");
|
||||||
|
|
||||||
|
|
@ -678,8 +679,8 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
$this->Mail->Subject .= ": Plain + StringAttachment";
|
$this->Mail->Subject .= ": Plain + StringAttachment";
|
||||||
|
|
||||||
$sAttachment = "These characters are the content of the " .
|
$sAttachment = "These characters are the content of the " .
|
||||||
"string attachment.\nThis might be taken from a " .
|
"string attachment.\nThis might be taken from a " .
|
||||||
"database or some other such thing. ";
|
"database or some other such thing. ";
|
||||||
|
|
||||||
$this->Mail->AddStringAttachment($sAttachment, "string_attach.txt");
|
$this->Mail->AddStringAttachment($sAttachment, "string_attach.txt");
|
||||||
|
|
||||||
|
|
@ -701,10 +702,13 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
|
$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
|
||||||
|
|
||||||
//Check that a quoted printable encode and decode results in the same as went in
|
//Check that a quoted printable encode and decode results in the same as went in
|
||||||
$t = substr(file_get_contents(__FILE__), 0, 1024); //Just pick a chunk of this file as test content
|
$t = file_get_contents(__FILE__); //Use this file as test content
|
||||||
$this->assertEquals($t, quoted_printable_decode($this->Mail->EncodeQP($t)), 'QP encoding round-trip failed');
|
$this->assertEquals(
|
||||||
//$this->assertEquals($t, quoted_printable_decode($this->Mail->EncodeQPphp($t)), 'Native PHP QP encoding round-trip failed'); //TODO the PHP qp encoder is quite broken
|
$t,
|
||||||
|
quoted_printable_decode($this->Mail->EncodeQP($t)),
|
||||||
|
'Quoted-Printable encoding round-trip failed'
|
||||||
|
);
|
||||||
|
$this->assertEquals($this->Mail->EncodeQP($t), $this->Mail->EncodeQPphp($t), 'Quoted-Printable BC wrapper failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -717,9 +721,9 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
$this->Mail->Subject .= ": HTML only";
|
$this->Mail->Subject .= ": HTML only";
|
||||||
|
|
||||||
$this->Mail->Body = "This is a <b>test message</b> written in HTML. </br>" .
|
$this->Mail->Body = "This is a <b>test message</b> written in HTML. </br>" .
|
||||||
"Go to <a href=\"http://phpmailer.sourceforge.net/\">" .
|
"Go to <a href=\"http://phpmailer.sourceforge.net/\">" .
|
||||||
"http://phpmailer.sourceforge.net/</a> for new versions of " .
|
"http://phpmailer.sourceforge.net/</a> for new versions of " .
|
||||||
"phpmailer. <p/> Thank you!";
|
"phpmailer. <p/> Thank you!";
|
||||||
|
|
||||||
$this->BuildBody();
|
$this->BuildBody();
|
||||||
$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
|
$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
|
||||||
|
|
@ -751,7 +755,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->Mail->Body = "Embedded Image: <img alt=\"phpmailer\" src=\"cid:my-attach\">" .
|
$this->Mail->Body = "Embedded Image: <img alt=\"phpmailer\" src=\"cid:my-attach\">" .
|
||||||
"Here is an image!</a>";
|
"Here is an image!</a>";
|
||||||
$this->Mail->Subject .= ": Embedded Image";
|
$this->Mail->Subject .= ": Embedded Image";
|
||||||
$this->Mail->IsHTML(true);
|
$this->Mail->IsHTML(true);
|
||||||
|
|
||||||
|
|
@ -782,7 +786,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->Mail->Body = "Embedded Image: <img alt=\"phpmailer\" src=\"cid:my-attach\">" .
|
$this->Mail->Body = "Embedded Image: <img alt=\"phpmailer\" src=\"cid:my-attach\">" .
|
||||||
"Here is an image!</a>";
|
"Here is an image!</a>";
|
||||||
$this->Mail->Subject .= ": Embedded Image + Attachment";
|
$this->Mail->Subject .= ": Embedded Image + Attachment";
|
||||||
$this->Mail->IsHTML(true);
|
$this->Mail->IsHTML(true);
|
||||||
|
|
||||||
|
|
@ -815,8 +819,8 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->Mail->Body = "This is the <strong>HTML</strong> part of the email.";
|
$this->Mail->Body = "This is the <strong>HTML</strong> part of the email.";
|
||||||
$this->Mail->AltBody = "Here is the text body of this message. " .
|
$this->Mail->AltBody = "Here is the text body of this message. " .
|
||||||
"It should be quite a few lines. It should be wrapped at the " .
|
"It should be quite a few lines. It should be wrapped at the " .
|
||||||
"40 characters. Make sure that it is.";
|
"40 characters. Make sure that it is.";
|
||||||
$this->Mail->WordWrap = 40;
|
$this->Mail->WordWrap = 40;
|
||||||
$this->AddNote("This is a mulipart alternative email");
|
$this->AddNote("This is a mulipart alternative email");
|
||||||
$this->Mail->Subject .= ": AltBody + Word Wrap";
|
$this->Mail->Subject .= ": AltBody + Word Wrap";
|
||||||
|
|
@ -986,10 +990,10 @@ class phpmailerTest extends PHPUnit_Framework_TestCase
|
||||||
$missing = array_diff(array_keys($definedStrings), array_keys($PHPMAILER_LANG));
|
$missing = array_diff(array_keys($definedStrings), array_keys($PHPMAILER_LANG));
|
||||||
$extra = array_diff(array_keys($PHPMAILER_LANG), array_keys($definedStrings));
|
$extra = array_diff(array_keys($PHPMAILER_LANG), array_keys($definedStrings));
|
||||||
if (!empty($missing)) {
|
if (!empty($missing)) {
|
||||||
$err .= "Missing translations in $lang: " . implode(', ', $missing)."\n";
|
$err .= "Missing translations in $lang: " . implode(', ', $missing) . "\n";
|
||||||
}
|
}
|
||||||
if (!empty($extra)) {
|
if (!empty($extra)) {
|
||||||
$err .= "Extra translations in $lang: " . implode(', ', $extra)."\n";
|
$err .= "Extra translations in $lang: " . implode(', ', $extra) . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue