diff --git a/ChangeLog.txt b/ChangeLog.txt index 22f83961..5de251ee 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,25 @@ ChangeLog NOTE: THIS VERSION OF PHPMAILER IS DESIGNED FOR PHP5/PHP6. IT WILL NOT WORK WITH PHP4. +Version 2.3 (November 06, 2008) + +* added Arabic language (many thanks to Bahjat Al Mostafa) +* removed English language from language files and made it a default within + class.phpmailer.php - if no language is found, it will default to use + the english language translation +* fixed public/private declarations +* corrected line 1728, $basedir to $directory +* added $sign_cert_file to avoid improper duplicate use of $sign_key_file +* corrected $this->Hello on line 612 to $this->Helo +* changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user + if default is not acceptable +* removed trim() from return results in EncodeQP +* /test and three files it contained are removed from version 2.3 +* fixed phpunit.php for compliance with PHP5 +* changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg); +* We have removed the /phpdoc from the downloads. All documentation is now on + the http://phpmailer.codeworxtech.com website. + Version 2.2.1 () July 19 2008 * fixed line 1092 in class.smtp.php (my apologies, error on my part) diff --git a/README b/README index 73cdca8f..3f0ee3fa 100644 --- a/README +++ b/README @@ -9,6 +9,17 @@ PHPMailer Full Featured Email Transfer Class for PHP ========================================== +Version 2.3 (November 08, 2008) + +We have removed the /phpdoc from the downloads. All documentation is now on +the http://phpmailer.codeworxtech.com website. + +The phpunit.php has been updated to support PHP5. + +For all other changes and notes, please see the changelog. + +Donations are accepted at PayPal with our id "paypal@worxteam.com". + Version 2.2 (July 15 2008) - see the changelog. diff --git a/class.phpmailer.php b/class.phpmailer.php index 51a50e78..419b26b6 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -2,7 +2,7 @@ /*~ class.phpmailer.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | -| Version: 2.2.1 | +| Version: 2.3 | | Contact: via sourceforge.net support pages (also www.codeworxtech.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | @@ -140,7 +140,7 @@ class PHPMailer { * Holds PHPMailer version. * @var string */ - public $Version = "2.2"; + public $Version = "2.3"; /** * Sets the email address that a reading confirmation will be sent. @@ -242,6 +242,12 @@ class PHPMailer { */ public $SingleTo = false; + /** + * Provides the ability to change the line ending + * @var string + */ + public $LE = "\r\n"; + ///////////////////////////////////////////////// // PROPERTIES, PRIVATE ///////////////////////////////////////////////// @@ -257,7 +263,6 @@ class PHPMailer { private $boundary = array(); private $language = array(); private $error_count = 0; - private $LE = "\n"; private $sign_cert_file = ""; private $sign_key_file = ""; private $sign_key_pass = ""; @@ -604,7 +609,7 @@ class PHPMailer { if($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) { - $hello = ($this->Helo != '' ? $this->Hello : $this->ServerHostname()); + $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname()); $this->smtp->Hello($hello); if($tls) { @@ -660,8 +665,20 @@ class PHPMailer { */ function SetLanguage($lang_type = 'en', $lang_path = 'language/') { if( !(@include $lang_path.'phpmailer.lang-'.$lang_type.'.php') ) { - $this->SetError('Could not load language file'); - return false; + $PHPMAILER_LANG = array(); + $PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' . + $PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.'; + $PHPMAILER_LANG["execute"] = 'Could not execute: '; + $PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.'; + $PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.'; + $PHPMAILER_LANG["from_failed"] = 'The following From address failed: '; + $PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' . + $PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.'; + $PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.'; + $PHPMAILER_LANG["file_access"] = 'Could not access file: '; + $PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: '; + $PHPMAILER_LANG["encoding"] = 'Unknown encoding: '; + $PHPMAILER_LANG["signing"] = 'Signing Error: '; } $this->language = $PHPMAILER_LANG; return true; @@ -875,9 +892,6 @@ class PHPMailer { } elseif (count($this->cc) == 0) { $result .= $this->HeaderLine('To', 'undisclosed-recipients:;'); } - if(count($this->cc) > 0) { - $result .= $this->AddrAppend('Cc', $this->cc); - } } $from = array(); @@ -1423,7 +1437,7 @@ class PHPMailer { } // end of for $output .= $newline.$eol; } // end of while - return trim($output); + return $output; } /** @@ -1711,8 +1725,7 @@ class PHPMailer { $ext = $fileParts[1]; $mimeType = $this->_mime_types($ext); if ( strlen($basedir) > 1 && substr($basedir,-1) != '/') { $basedir .= '/'; } - if ( strlen($directory) > 1 && substr($basedir,-1) != '/') { $directory .= '/'; } - $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64', $mimeType); + if ( strlen($directory) > 1 && substr($directory,-1) != '/') { $directory .= '/'; } if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64',$mimeType) ) { $message = preg_replace("/".$images[1][$i]."=\"".preg_quote($url, '/')."\"/Ui", $images[1][$i]."=\"".$cid."\"", $message); } @@ -1723,7 +1736,7 @@ class PHPMailer { $this->Body = $message; $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message))); if ( !empty($textMsg) && empty($this->AltBody) ) { - $this->AltBody = $textMsg; + $this->AltBody = html_entity_decode($textMsg); } if ( empty($this->AltBody) ) { $this->AltBody = 'To view this email message, open the email in with HTML compatibility!' . "\n\n"; @@ -1894,4 +1907,4 @@ class PHPMailer { } } -?> +?> \ No newline at end of file diff --git a/class.pop3.php b/class.pop3.php index af342bc5..0884a825 100644 --- a/class.pop3.php +++ b/class.pop3.php @@ -2,7 +2,7 @@ /*~ class.pop3.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | -| Version: 2.2.1 | +| Version: 2.3 | | Contact: via sourceforge.net support pages (also www.codeworxtech.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | @@ -26,7 +26,7 @@ /** * POP Before SMTP Authentication Class - * Version 2.1 + * Version 2.3 * * Author: Richard Davey (rich@corephp.co.uk) * Modifications: Andy Prevost @@ -390,4 +390,4 @@ class POP3 { // End of class } -?> +?> \ No newline at end of file diff --git a/class.smtp.php b/class.smtp.php index f1c9cfe7..360d6afd 100644 --- a/class.smtp.php +++ b/class.smtp.php @@ -2,7 +2,7 @@ /*~ class.smtp.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | -| Version: 2.2.1 | +| Version: 2.3 | | Contact: via sourceforge.net support pages (also www.codeworxtech.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | @@ -170,7 +170,7 @@ class SMTP { return false; } - fputs($this->smtp_conn,"STARTTLS" . $extra . $this->CRLF); + fputs($this->smtp_conn,"STARTTLS" . $this->CRLF); $rply = $this->get_lines(); $code = substr($rply,0,3); @@ -1109,5 +1109,4 @@ class SMTP { } - - ?> +?> \ No newline at end of file diff --git a/codeworxtech.html b/codeworxtech.html index 2604a862..68ccaa93 100644 --- a/codeworxtech.html +++ b/codeworxtech.html @@ -66,11 +66,11 @@ Thanks ....

WHY USE OUR TOOLS & WHAT'S IN IT FOR YOU?

A valid question. We're developers too. We've been writing software, primarily for the internet, for more than 15 years. Along the way, there are two major things that had tremendous impact of our company: PHP and Open Source. PHP is without doubt the most popular platform for the internet. There has been more progress in this area of technology because of Open Source software than in any other IT segment. We have used many open source tools, some as learning tools, some as components in projects we were working on. To us, it's not about popularity ... we're committed to robust, stable, and efficient tools you can use to get your projects in your user's hands quickly. So the shorter answer: what's in it for you? rapid development and rapid deployment without fuss and with straight forward open source licensing.

Now, the introductions:

-

Our company, Codeworx Technologies, is the publisher of several Open Source applications and developer tools as well as several commercial PHP applications. The Open Source applications are ttCMS and DCP Portal. The Open Source developer tools include QuickComponents (QuickSkin, QuickCache, and QuickTabs) and now PHPMailer. -We have staff and offices in the United States, Canada, Caribbean, the Middle -East, and our primary development center in India. Our company is represented by +

Our company, Worx International Inc., is the publisher of several Open Source applications and developer tools as well as several commercial PHP applications. The Open Source applications are ttCMS and DCP Portal. The Open Source developer tools include QuickComponents (QuickSkin and QuickCache) and now PHPMailer. +We have staff and offices in the United States, Caribbean, the Middle +East, and our primary development center in Canada. Our company is represented by agents and resellers globally.

-

Codeworx Technologies is at the forefront of developing PHP applications. Our staff are all Zend Certified university educated and experts at object oriented programming. While Codeworx Technologies can handle any project from trouble shooting programs written by others all the way to finished mission-critical applications, we specialize in taking projects from inception all the way through to implementation - on budget, and on time. If you need help with your projects, we're the team to get it done right at a reasonable price.

+

Worx International Inc. is at the forefront of developing PHP applications. Our staff are all Zend Certified university educated and experts at object oriented programming. While Worx International Inc. can handle any project from trouble shooting programs written by others all the way to finished mission-critical applications, we specialize in taking projects from inception all the way through to implementation - on budget, and on time. If you need help with your projects, we're the team to get it done right at a reasonable price.

Over the years, there have been a number of tools that have been constant favorites in all of our projects. We have become the project administrators for most of these tools.

Our developer tools are all Open Source. Here's a brief description:

We're committed to PHP and to the Open Source community.

-

Opportunities with Codeworx Technologies:

+

Opportunities with Worx International Inc.: