From: Roland Häder Date: Thu, 5 Jun 2008 10:00:32 +0000 (+0000) Subject: PHPMailer updated to v2.0.2 X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=b666ad9a3cd2870ad4ad56c6f42de7630597cec8 PHPMailer updated to v2.0.2 --- diff --git a/.gitattributes b/.gitattributes index f81ab98f4d..5d3e807deb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -464,6 +464,7 @@ inc/phpmailer/class.smtp.php -text inc/phpmailer/codeworxtech.html -text inc/phpmailer/docs/extending.html -text inc/phpmailer/docs/faq.html -text +inc/phpmailer/docs/phpmailer_sm.gif -text inc/phpmailer/docs/pop3_article.txt -text inc/phpmailer/docs/use_gmail.txt -text inc/phpmailer/examples/contents.html -text @@ -474,6 +475,10 @@ inc/phpmailer/examples/images/phpmailer_mini.gif -text inc/phpmailer/examples/index.html -text inc/phpmailer/examples/pop3_before_smtp_test.php -text inc/phpmailer/examples/test1.php -text +inc/phpmailer/examples/test_gmail.php -text +inc/phpmailer/examples/test_mail.php -text +inc/phpmailer/examples/test_sendmail.php -text +inc/phpmailer/examples/test_smtp.php -text inc/phpmailer/language/phpmailer.lang-br.php -text inc/phpmailer/language/phpmailer.lang-ca.php -text inc/phpmailer/language/phpmailer.lang-cz.php -text @@ -487,7 +492,7 @@ inc/phpmailer/language/phpmailer.lang-fo.php -text inc/phpmailer/language/phpmailer.lang-fr.php -text inc/phpmailer/language/phpmailer.lang-hu.php -text inc/phpmailer/language/phpmailer.lang-it.php -text -inc/phpmailer/language/phpmailer.lang-ja.php -text +inc/phpmailer/language/phpmailer.lang-ja.php -text svneol=unset#unset inc/phpmailer/language/phpmailer.lang-nl.php -text inc/phpmailer/language/phpmailer.lang-no.php -text inc/phpmailer/language/phpmailer.lang-pl.php -text diff --git a/inc/phpmailer/ChangeLog.txt b/inc/phpmailer/ChangeLog.txt index acf4eb3b8e..44e4e87e44 100644 --- a/inc/phpmailer/ChangeLog.txt +++ b/inc/phpmailer/ChangeLog.txt @@ -1,10 +1,38 @@ ChangeLog +Version 2.0.2 (June 04 2008) + +** 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. + +* added S/MIME functionality (ability to digitally sign emails) + BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. + The "Signed Emails" functionality adds the Sign method to pass the private key + filename and the password to read it, and then email will be sent with + content-type multipart/signed and with the digital signature attached. +* added ability to define path (mainly for embedded images) + function MsgHTML($message,$basedir='') ... where: + $basedir is the fully qualified path +* fixed MsgHTML() function: + - Embedded Images where images are specified by :// will not be altered or embedded +* fixed the return value of SMTP exit code ( pclose ) +* addressed issue of multibyte characters in subject line and truncating +* added ability to have user specified Message ID + (default is still that PHPMailer create a unique Message ID) +* corrected unidentified message type to 'application/octet-stream' +* fixed chunk_split() multibyte issue (thanks to Colin Brown, et al). +* added check for added attachments +* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny") + +Version 2.0.1 (Sun, Dec 02 2007) +* corrected incorrect version numbers in all three classes + Version 2.0.0 (Sun, Dec 02 2007) * implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon) * finished all testing, all known bugs corrected, enhancements tested - note: designed for PHP4, but will work with PHP5 (not compatible with - E_STRICT) ... full PHP5 version of PHPMailer released separately. + E_STRICT) ... full PHP5 version of PHPMailer released separately. PHP5 version will NOT work with PHP4. Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release @@ -19,9 +47,9 @@ Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release ****************** A note on sending bulk emails: -If the email you are sending is not personalized, consider using the +If the email you are sending is not personalized, consider using the "undisclosed-recipient:;" strategy. That is, put all of your recipients -in the Bcc field and set the To field to "undisclosed-recipients:;". +in the Bcc field and set the To field to "undisclosed-recipients:;". It's a lot faster (only one send) and saves quite a bit on resources. Contrary to some opinions, this will not get you listed in spam engines - it's a legitimate way for you to send emails. @@ -40,17 +68,21 @@ less than your limit, and put a pause in your script. ******************* 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 MsgHTML() function to replace Body tag for HTML emails * fixed the SendMail security issues (input validation vulnerability) -* enhanced the AddAddresses functionality so that the "Name" portion is used in the email address -* removed the need to use the AltBody method (set from the HTML, or default text used) +* enhanced the AddAddresses functionality so that the "Name" portion is used + in the email address +* removed the need to use the AltBody method (set from the HTML, or default + text used) * set the PHP Mail() function as the default (still support SendMail, SMTP Mail) * removed the need to set the IsHTML property (set automatically) * added Estonian language file by Indrek Päri * 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: $mail->set('X-Priority', '3'); $mail->set('X-MSMail-Priority', 'Normal'); @@ -75,7 +107,7 @@ Version 1.73 (Sun, Jun 10 2005) Version 1.72 (Wed, May 25 2004) * 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. * Fixed error count bug. * SetLanguage default is now "language/". diff --git a/inc/phpmailer/README b/inc/phpmailer/README index 900c63043e..75b76c10a4 100644 --- a/inc/phpmailer/README +++ b/inc/phpmailer/README @@ -1,7 +1,38 @@ +/******************************************************************* +* The http://phpmailer.codeworxtech.com/ website now carries a few * +* advertisements through the Google Adsense network. Please visit * +* the advertiser sites and help us offset some of our costs. * +* Thanks .... * +********************************************************************/ + PHPMailer Full Featured Email Transfer Class for PHP ========================================== +Version 2.0.2 (June 04 2008) + +With this release, we are announcing that the development of PHPMailer for PHP5 +will be our focus from this date on. We have implemented all the enhancements +and fixes from the sourceforge.net Tracker. + +** 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. + +We have now added S/MIME functionality (ability to digitally sign emails). +BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. +The "Signed Emails" functionality adds the Sign method to pass the private key +filename and the password to read it, and then email will be sent with +content-type multipart/signed and with the digital signature attached. + +We have also included more example files to show the use of "sendmail", "mail()", +"smtp", and "gmail". + +We are also looking for more programmers to join the volunteer development team. +If you have an interest in this, please let us know. + +Enjoy! + ** NOTE: As of November 2007, PHPMailer has a new project team headed by industry @@ -16,7 +47,7 @@ its leadership position. Our goals are to simplify use of PHPMailer, provide good documentation and examples, and retain backward compatibility to level 1.7.3 standards. -If you are interested in helping out, visit http://sourceforge.net/phpmailer +If you are interested in helping out, visit http://sourceforge.net/phpmailer and indicate your interest. ** @@ -58,14 +89,14 @@ Installation: Copy class.phpmailer.php into your php.ini include_path. If you are using the SMTP mailer then place class.smtp.php in your path as well. -In the language directory you will find several files like -phpmailer.lang-en.php. If you look right before the .php extension -that there are two letters. These represent the language type of the -translation file. For instance "en" is the English file and "br" is -the Portuguese file. Chose the file that best fits with your language -and place it in the PHP include path. If your language is English -then you have nothing more to do. If it is a different language then -you must point PHPMailer to the correct translation. To do this, call +In the language directory you will find several files like +phpmailer.lang-en.php. If you look right before the .php extension +that there are two letters. These represent the language type of the +translation file. For instance "en" is the English file and "br" is +the Portuguese file. Chose the file that best fits with your language +and place it in the PHP include path. If your language is English +then you have nothing more to do. If it is a different language then +you must point PHPMailer to the correct translation. To do this, call the PHPMailer SetLanguage method like so: // To load the Portuguese version diff --git a/inc/phpmailer/class.phpmailer.php b/inc/phpmailer/class.phpmailer.php index 0879aff5e2..2ddc30fd27 100644 --- a/inc/phpmailer/class.phpmailer.php +++ b/inc/phpmailer/class.phpmailer.php @@ -2,7 +2,7 @@ /*~ class.phpmailer.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | -| Version: 2.0.0 rc3 | +| Version: 2.0.2 | | Contact: via sourceforge.net support pages (also www.codeworxtech.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | @@ -28,7 +28,7 @@ * PHPMailer - PHP email transport class * @package PHPMailer * @author Andy Prevost - * @copyright 2004 - 2007 Andy Prevost + * @copyright 2004 - 2008 Andy Prevost */ class PHPMailer { @@ -66,7 +66,7 @@ class PHPMailer { * Holds the most recent mailer error message. * @var string */ - var $ErrorInfo = ""; + var $ErrorInfo = ''; /** * Sets the From email address for the message. @@ -85,20 +85,20 @@ class PHPMailer { * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. * @var string */ - var $Sender = ""; + var $Sender = ''; /** * Sets the Subject of the message. * @var string */ - var $Subject = ""; + var $Subject = ''; /** * Sets the Body of the message. This can be either an HTML or text body. * If HTML then run IsHTML(true). * @var string */ - var $Body = ""; + var $Body = ''; /** * Sets the text-only body of the message. This automatically sets the @@ -107,7 +107,7 @@ class PHPMailer { * that can read HTML will view the normal Body. * @var string */ - var $AltBody = ""; + var $AltBody = ''; /** * Sets word wrapping on the body of the message to a given number of @@ -133,19 +133,19 @@ class PHPMailer { * is in a different directory than the PHP include path. * @var string */ - var $PluginDir = ""; + var $PluginDir = ''; /** * Holds PHPMailer version. * @var string */ - var $Version = "2.0.0 rc3"; + var $Version = "2.0.2"; /** * Sets the email address that a reading confirmation will be sent. * @var string */ - var $ConfirmReadingTo = ""; + var $ConfirmReadingTo = ''; /** * Sets the hostname to use in Message-Id and Received headers @@ -153,7 +153,14 @@ class PHPMailer { * by SERVER_NAME is used or 'localhost.localdomain'. * @var string */ - var $Hostname = ""; + var $Hostname = ''; + + /** + * Sets the message ID to be used in the Message-Id header. + * If empty, a unique id will be generated. + * @var string + */ + var $MessageID = ''; ///////////////////////////////////////////////// // PROPERTIES FOR SMTP @@ -179,7 +186,7 @@ class PHPMailer { * Sets the SMTP HELO of the message (Default is $Hostname). * @var string */ - var $Helo = ""; + var $Helo = ''; /** * Sets connection prefix. @@ -198,13 +205,13 @@ class PHPMailer { * Sets SMTP username. * @var string */ - var $Username = ""; + var $Username = ''; /** * Sets SMTP password. * @var string */ - var $Password = ""; + var $Password = ''; /** * Sets the SMTP server timeout in seconds. This function will not @@ -245,11 +252,13 @@ class PHPMailer { var $ReplyTo = array(); var $attachment = array(); var $CustomHeader = array(); - var $message_type = ""; + var $message_type = ''; var $boundary = array(); var $language = array(); var $error_count = 0; var $LE = "\n"; + var $sign_key_file = ""; + var $sign_key_pass = ""; ///////////////////////////////////////////////// // METHODS, VARIABLES @@ -311,7 +320,7 @@ class PHPMailer { * @param string $name * @return void */ - function AddAddress($address, $name = "") { + function AddAddress($address, $name = '') { $cur = count($this->to); $this->to[$cur][0] = trim($address); $this->to[$cur][1] = $name; @@ -325,7 +334,7 @@ class PHPMailer { * @param string $name * @return void */ - function AddCC($address, $name = "") { + function AddCC($address, $name = '') { $cur = count($this->cc); $this->cc[$cur][0] = trim($address); $this->cc[$cur][1] = $name; @@ -339,7 +348,7 @@ class PHPMailer { * @param string $name * @return void */ - function AddBCC($address, $name = "") { + function AddBCC($address, $name = '') { $cur = count($this->bcc); $this->bcc[$cur][0] = trim($address); $this->bcc[$cur][1] = $name; @@ -351,7 +360,7 @@ class PHPMailer { * @param string $name * @return void */ - function AddReplyTo($address, $name = "") { + function AddReplyTo($address, $name = '') { $cur = count($this->ReplyTo); $this->ReplyTo[$cur][0] = trim($address); $this->ReplyTo[$cur][1] = $name; @@ -368,8 +377,8 @@ class PHPMailer { * @return bool */ function Send() { - $header = ""; - $body = ""; + $header = ''; + $body = ''; $result = true; if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { @@ -387,7 +396,7 @@ class PHPMailer { $header .= $this->CreateHeader(); $body = $this->CreateBody(); - if($body == "") { + if($body == '') { return false; } @@ -433,12 +442,14 @@ class PHPMailer { fputs($mail, $header); fputs($mail, $body); - $result = pclose($mail) >> 8 & 0xFF; + $result = pclose($mail); + if (version_compare(phpversion(), '4.2.3') == -1) { + $result = $result >> 8 & 0xFF; + } if($result != 0) { $this->SetError($this->Lang('execute') . $this->Sendmail); return false; } - return true; } @@ -449,7 +460,7 @@ class PHPMailer { */ function MailSend($header, $body) { - $to = ""; + $to = ''; for($i = 0; $i < count($this->to); $i++) { if($i != 0) { $to .= ', '; } $to .= $this->AddrFormat($this->to[$i]); @@ -457,10 +468,10 @@ class PHPMailer { $toArr = split(',', $to); - if ($this->Sender != '' && strlen(ini_get('safe_mode'))< 1) { + $params = sprintf("-oi -f %s", $this->Sender); + if ($this->Sender != '' && strlen(ini_get('safe_mode')) < 1) { $old_from = ini_get('sendmail_from'); ini_set('sendmail_from', $this->Sender); - $params = sprintf("-oi -f %s", $this->Sender); if ($this->SingleTo === true && count($toArr) > 1) { foreach ($toArr as $key => $val) { $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); @@ -499,14 +510,14 @@ class PHPMailer { */ function SmtpSend($header, $body) { include_once($this->PluginDir . 'class.smtp.php'); - $error = ""; + $error = ''; $bad_rcpt = array(); if(!$this->SmtpConnect()) { return false; } - $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender; + $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; if(!$this->smtp->Mail($smtp_from)) { $error = $this->Lang('from_failed') . $smtp_from; $this->SetError($error); @@ -585,7 +596,7 @@ class PHPMailer { $port = $this->Port; } - if($this->smtp->Connect(((!empty($this->SMTPSecure))?$this->SMTPSecure.'://':"").$host, $port, $this->Timeout)) { + if($this->smtp->Connect(((!empty($this->SMTPSecure))?$this->SMTPSecure.'://':'').$host, $port, $this->Timeout)) { if ($this->Helo != '') { $this->smtp->Hello($this->Helo); } else { @@ -692,6 +703,9 @@ class PHPMailer { */ function WrapText($message, $length, $qp_mode = false) { $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = (strtolower($this->CharSet) == "utf-8"); $message = $this->FixEOL($message); if (substr($message, -1) == $this->LE) { @@ -699,10 +713,10 @@ class PHPMailer { } $line = explode($this->LE, $message); - $message = ""; + $message = ''; for ($i=0 ;$i < count($line); $i++) { $line_part = explode(' ', $line[$i]); - $buf = ""; + $buf = ''; for ($e = 0; $e $length)) { @@ -710,9 +724,11 @@ class PHPMailer { if ($e != 0) { if ($space_left > 20) { $len = $space_left; - if (substr($word, $len - 1, 1) == '=') { + if ($is_utf8) { + $len = $this->UTF8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { $len--; - } elseif (substr($word, $len - 2, 1) == '=') { + } elseif (substr($word, $len - 2, 1) == "=") { $len -= 2; } $part = substr($word, 0, $len); @@ -722,13 +738,15 @@ class PHPMailer { } else { $message .= $buf . $soft_break; } - $buf = ""; + $buf = ''; } while (strlen($word) > 0) { $len = $length; - if (substr($word, $len - 1, 1) == '=') { + if ($is_utf8) { + $len = $this->UTF8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { $len--; - } elseif (substr($word, $len - 2, 1) == '=') { + } elseif (substr($word, $len - 2, 1) == "=") { $len -= 2; } $part = substr($word, 0, $len); @@ -756,6 +774,47 @@ class PHPMailer { return $message; } + /** + * Finds last character boundary prior to maxLength in a utf-8 + * quoted (printable) encoded string. + * Original written by Colin Brown. + * @access private + * @param string $encodedText utf-8 QP text + * @param int $maxLength find last character boundary prior to this length + * @return int + */ + function UTF8CharBoundary($encodedText, $maxLength) { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, "="); + if ($encodedCharPos !== false) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + $maxLength = ($encodedCharPos == 0) ? $maxLength : + $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec >= 192) { // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + return $maxLength; + } + /** * Set the body wrapping. * @access private @@ -784,7 +843,7 @@ class PHPMailer { * @return string */ function CreateHeader() { - $result = ""; + $result = ''; /* Set the boundaries */ $uniq_id = md5(uniqid(time())); @@ -792,7 +851,7 @@ class PHPMailer { $this->boundary[2] = 'b2_' . $uniq_id; $result .= $this->HeaderLine('Date', $this->RFCDate()); - if($this->Sender == "") { + if($this->Sender == '') { $result .= $this->HeaderLine('Return-Path', trim($this->From)); } else { $result .= $this->HeaderLine('Return-Path', trim($this->Sender)); @@ -834,7 +893,11 @@ class PHPMailer { $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); } - $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + if($this->MessageID != '') { + $result .= $this->HeaderLine('Message-ID',$this->MessageID); + } else { + $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + } $result .= $this->HeaderLine('X-Priority', $this->Priority); $result .= $this->HeaderLine('X-Mailer', 'PHPMailer (phpmailer.sourceforge.net) [version ' . $this->Version . ']'); @@ -846,8 +909,21 @@ class PHPMailer { for($index = 0; $index < count($this->CustomHeader); $index++) { $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); } - $result .= $this->HeaderLine('MIME-Version', '1.0'); + if (!$this->sign_key_file) { + $result .= $this->HeaderLine('MIME-Version', '1.0'); + $result .= $this->GetMailMIME(); + } + + return $result; + } + /** + * Returns the message MIME. + * @access private + * @return string + */ + function GetMailMIME() { + $result = ''; switch($this->message_type) { case 'plain': $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); @@ -882,16 +958,19 @@ class PHPMailer { * @return string */ function CreateBody() { - $result = ""; + $result = ''; + if ($this->sign_key_file) { + $result .= $this->GetMailMIME(); + } $this->SetWordWrap(); switch($this->message_type) { case 'alt': - $result .= $this->GetBoundary($this->boundary[1], "", 'text/plain', ""); + $result .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); $result .= $this->EncodeString($this->AltBody, $this->Encoding); $result .= $this->LE.$this->LE; - $result .= $this->GetBoundary($this->boundary[1], "", 'text/html', ""); + $result .= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); $result .= $this->EncodeString($this->Body, $this->Encoding); $result .= $this->LE.$this->LE; $result .= $this->EndBoundary($this->boundary[1]); @@ -900,7 +979,7 @@ class PHPMailer { $result .= $this->EncodeString($this->Body, $this->Encoding); break; case 'attachments': - $result .= $this->GetBoundary($this->boundary[1], "", "", ""); + $result .= $this->GetBoundary($this->boundary[1], '', '', ''); $result .= $this->EncodeString($this->Body, $this->Encoding); $result .= $this->LE; $result .= $this->AttachAll(); @@ -908,18 +987,37 @@ class PHPMailer { case 'alt_attachments': $result .= sprintf("--%s%s", $this->boundary[1], $this->LE); $result .= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE.$this->LE); - $result .= $this->GetBoundary($this->boundary[2], "", 'text/plain', "") . $this->LE; // Create text body + $result .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; // Create text body $result .= $this->EncodeString($this->AltBody, $this->Encoding); $result .= $this->LE.$this->LE; - $result .= $this->GetBoundary($this->boundary[2], "", 'text/html', "") . $this->LE; // Create the HTML body + $result .= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; // Create the HTML body $result .= $this->EncodeString($this->Body, $this->Encoding); $result .= $this->LE.$this->LE; $result .= $this->EndBoundary($this->boundary[2]); $result .= $this->AttachAll(); break; } + if($this->IsError()) { - $result = ""; + $result = ''; + } else if ($this->sign_key_file) { + $file = tempnam("", "mail"); + $fp = fopen($file, "w"); + fwrite($fp, $result); + fclose($fp); + $signed = tempnam("", "signed"); + + if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_key_file, array("file://".$this->sign_key_file, $this->sign_key_pass), null)) { + $fp = fopen($signed, "r"); + $result = fread($fp, filesize($this->sign_key_file)); + fclose($fp); + } else { + $this->SetError($this->Lang("signing").openssl_error_string()); + $result = ''; + } + + unlink($file); + unlink($signed); } return $result; @@ -930,14 +1028,14 @@ class PHPMailer { * @access private */ function GetBoundary($boundary, $charSet, $contentType, $encoding) { - $result = ""; - if($charSet == "") { + $result = ''; + if($charSet == '') { $charSet = $this->CharSet; } - if($contentType == "") { + if($contentType == '') { $contentType = $this->ContentType; } - if($encoding == "") { + if($encoding == '') { $encoding = $this->Encoding; } $result .= $this->TextLine('--' . $boundary); @@ -1009,14 +1107,14 @@ class PHPMailer { * @param string $type File extension (MIME) type. * @return bool */ - function AddAttachment($path, $name = "", $encoding = 'base64', $type = 'application/octet-stream') { + function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { if(!@is_file($path)) { $this->SetError($this->Lang('file_access') . $path); return false; } $filename = basename($path); - if($name == "") { + if($name == '') { $name = $filename; } @@ -1074,13 +1172,13 @@ class PHPMailer { if($bString) { $mime[] = $this->EncodeString($string, $encoding); if($this->IsError()) { - return ""; + return ''; } $mime[] = $this->LE.$this->LE; } else { $mime[] = $this->EncodeFile($path, $encoding); if($this->IsError()) { - return ""; + return ''; } $mime[] = $this->LE.$this->LE; } @@ -1088,7 +1186,7 @@ class PHPMailer { $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); - return join("", $mime); + return join('', $mime); } /** @@ -1100,7 +1198,7 @@ class PHPMailer { function EncodeFile ($path, $encoding = 'base64') { if(!@$fd = fopen($path, 'rb')) { $this->SetError($this->Lang('file_open') . $path); - return ""; + return ''; } $magic_quotes = get_magic_quotes_runtime(); set_magic_quotes_runtime(0); @@ -1119,7 +1217,7 @@ class PHPMailer { * @return string */ function EncodeString ($str, $encoding = 'base64') { - $encoded = ""; + $encoded = ''; switch(strtolower($encoding)) { case 'base64': /* chunk_split is found in PHP >= 3.0.6 */ @@ -1182,9 +1280,15 @@ class PHPMailer { /* Try to select the encoding which should produce the shortest output */ if (strlen($str)/3 < $x) { $encoding = 'B'; - $encoded = base64_encode($str); - $maxlen -= $maxlen % 4; - $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->Base64EncodeWrapMB($str); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } } else { $encoding = 'Q'; $encoded = $this->EncodeQ($str, $position); @@ -1198,20 +1302,74 @@ class PHPMailer { return $encoded; } + /** + * Checks if a string contains multibyte characters. + * @access private + * @param string $str multi-byte text to wrap encode + * @return bool + */ + function HasMultiBytes($str) { + if (function_exists('mb_strlen')) { + return (strlen($str) > mb_strlen($str, $this->CharSet)); + } else { // Assume no multibytes (we can't handle without mbstring functions anyway) + return False; + } + } + + /** + * Correctly encodes and wraps long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php + * @access private + * @param string $str multi-byte text to wrap encode + * @return string + */ + function Base64EncodeWrapMB($str) { + $start = "=?".$this->CharSet."?B?"; + $end = "?="; + $encoded = ""; + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $offset = $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + $lookBack++; + } + while (strlen($chunk) > $length); + + $encoded .= $chunk . $this->LE; + } + + // Chomp the last linefeed + $encoded = substr($encoded, 0, -strlen($this->LE)); + return $encoded; + } + /** * Encode string to quoted-printable. * @access private * @return string */ - function EncodeQP( $input = "", $line_max = 76, $space_conv = false ) { + function EncodeQP( $input = '', $line_max = 76, $space_conv = false ) { $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); $lines = preg_split('/(?:\r\n|\r|\n)/', $input); $eol = "\r\n"; $escape = '='; - $output = ""; + $output = ''; while( list(, $line) = each($lines) ) { $linlen = strlen($line); - $newline = ""; + $newline = ''; for($i = 0; $i < $linlen; $i++) { $c = substr( $line, $i, 1 ); $dec = ord( $c ); @@ -1231,7 +1389,7 @@ class PHPMailer { } if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay - $newline = ""; + $newline = ''; // check if newline first character will be point or not if ( $dec == 46 ) { $c = '=2E'; @@ -1251,7 +1409,7 @@ class PHPMailer { */ function EncodeQ ($str, $position = 'text') { /* There should not be any EOL in the string */ - $encoded = preg_replace("[\r\n]", "", $str); + $encoded = preg_replace("[\r\n]", '', $str); switch (strtolower($position)) { case 'phrase': @@ -1309,7 +1467,7 @@ class PHPMailer { * @param string $type File extension (MIME) type. * @return bool */ - function AddEmbeddedImage($path, $cid, $name = "", $encoding = 'base64', $type = 'application/octet-stream') { + function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { if(!@is_file($path)) { $this->SetError($this->Lang('file_access') . $path); @@ -1317,7 +1475,7 @@ class PHPMailer { } $filename = basename($path); - if($name == "") { + if($name == '') { $name = $filename; } @@ -1467,7 +1625,7 @@ class PHPMailer { if(isset($_SERVER[$varName])) { return $_SERVER[$varName]; } else { - return ""; + return ''; } } @@ -1538,23 +1696,31 @@ class PHPMailer { * @access public * @return $message */ - function MsgHTML($message) { + function MsgHTML($message,$basedir='') { preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images); if(isset($images[2])) { foreach($images[2] as $i => $url) { - $filename = basename($url); - $directory = dirname($url); - $cid = 'cid:' . md5($filename); - $fileParts = split("\.", $filename); - $ext = $fileParts[1]; - $mimeType = $this->_mime_types($ext); - $message = preg_replace("/".$images[1][$i]."=\"".preg_quote($url, '/')."\"/Ui", $images[1][$i]."=\"".$cid."\"", $message); - $this->AddEmbeddedImage($url, md5($filename), $filename, 'base64', $mimeType); + // do not change urls for absolute images (thanks to corvuscorax) + if (!preg_match('/^[A-z][A-z]*:\/\//',$url)) { + $filename = basename($url); + $directory = dirname($url); + ($directory == '.')?$directory='':''; + $cid = 'cid:' . md5($filename); + $fileParts = split("\.", $filename); + $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 ( $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); + } + } } } $this->IsHTML(true); $this->Body = $message; - $textMsg = trim(strip_tags($message)); + $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message))); if ( !empty($textMsg) && empty($this->AltBody) ) { $this->AltBody = $textMsg; } @@ -1568,7 +1734,7 @@ class PHPMailer { * @access private * @return mime type of ext */ - function _mime_types($ext = "") { + function _mime_types($ext = '') { $mimes = array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', @@ -1658,7 +1824,7 @@ class PHPMailer { 'xl' => 'application/excel', 'eml' => 'message/rfc822' ); - return ( ! isset($mimes[strtolower($ext)])) ? 'application/x-unknown-content-type' : $mimes[strtolower($ext)]; + return ( ! isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)]; } /** @@ -1672,7 +1838,7 @@ class PHPMailer { * @param mixed $value Parameter Value * NOTE: will not work with arrays, there are no arrays to set/reset */ - function set ( $name, $value = "" ) { + function set ( $name, $value = '' ) { if ( isset($this->$name) ) { $this->$name = $value; } else { @@ -1688,7 +1854,7 @@ class PHPMailer { * @param string $filename Parameter File Name */ function getFile($filename) { - $return = ""; + $return = ''; if ($fp = fopen($filename, 'rb')) { while (!feof($fp)) { $return .= fread($fp, 1024); @@ -1713,6 +1879,18 @@ class PHPMailer { return $str; } + /** + * Set the private key file and password to sign the message. + * + * @access public + * @param string $key_filename Parameter File Name + * @param string $key_pass Password for private key + */ + function Sign($key_filename, $key_pass) { + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + } + } ?> diff --git a/inc/phpmailer/class.pop3.php b/inc/phpmailer/class.pop3.php index 901a174119..e97a0c9c90 100644 --- a/inc/phpmailer/class.pop3.php +++ b/inc/phpmailer/class.pop3.php @@ -2,7 +2,7 @@ /*~ class.pop3.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | -| Version: 2.0.0 rc2 | +| Version: 2.0.2 | | Contact: via sourceforge.net support pages (also www.codeworxtech.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | @@ -26,7 +26,6 @@ /** * POP Before SMTP Authentication Class - * Version 1.0 * * Author: Richard Davey (rich@corephp.co.uk) * License: LGPL, see PHPMailer License @@ -275,7 +274,7 @@ class POP3 * @param string $password * @return boolean */ - function Login ($username = "", $password = "") + function Login ($username = '', $password = '') { if ($this->connected == false) { @@ -382,7 +381,7 @@ class POP3 $this->error = array( 'error' => "Server reported an error: $string", 'errno' => 0, - 'errstr' => "" + 'errstr' => '' ); if ($this->do_debug >= 1) diff --git a/inc/phpmailer/class.smtp.php b/inc/phpmailer/class.smtp.php index 92b999f454..398c3ffbac 100644 --- a/inc/phpmailer/class.smtp.php +++ b/inc/phpmailer/class.smtp.php @@ -2,7 +2,7 @@ /*~ class.smtp.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | -| Version: 2.0.0 rc1 | +| Version: 2.0.2 | | Contact: via sourceforge.net support pages (also www.codeworxtech.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | diff --git a/inc/phpmailer/codeworxtech.html b/inc/phpmailer/codeworxtech.html index 9129a4d591..4a5cfd38f2 100644 --- a/inc/phpmailer/codeworxtech.html +++ b/inc/phpmailer/codeworxtech.html @@ -1,4 +1,4 @@ - + +
-

My name is Andy Prevost, AKA "codeworxtech".
-www.codeworxtech.com for more information.
-www.worxhost.com our webhosting division.

-

Before I introduce myself, our company and our developer tools to you, let me answer a huge question you likely have:

+
+The http://phpmailer.codeworxtech.com/ website now carries a few +advertisements through the Google Adsense network. Please visit +the advertiser sites and help us offset some of our costs.
+Thanks ....
+
+

My name is Andy Prevost, AKA "codeworxtech".
+www.codeworxtech.com for more information.
+

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, 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 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.

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:

    -
  • PHPMailer. Originally authored by Brent Matzelle, PHPMailer is the leading "email transfer class" for PHP. PHPMailer is downloaded more than 18000 times each and every month by developers looking for a stable, simple email solution. We used it ourselves for years as our favorite tool. It's always been small (the entire footprint is around 100 Kb), stable, and as complete a solution as you can find. Other tools are nowhere near as simple. And more importantly, most of our applications (including PHPMailer) is implemented in a smaller footprint than one competing email class. Our thanks to Brent Matzelle for this superb tool - our commitment is to keep it lean, keep it focused, and compliant with standards. Visit the PHPMailer website at - http://phpmailer.codeworxtech.com/.
    -
    +
  • PHPMailer. Originally authored by Brent Matzelle, PHPMailer is the leading "email transfer class" for PHP. PHPMailer is downloaded more than 18000 times each and every month by developers looking for a stable, simple email solution. We used it ourselves for years as our favorite tool. It's always been small (the entire footprint is around 100 Kb), stable, and as complete a solution as you can find. Other tools are nowhere near as simple. And more importantly, most of our applications (including PHPMailer) is implemented in a smaller footprint than one competing email class. Our thanks to Brent Matzelle for this superb tool - our commitment is to keep it lean, keep it focused, and compliant with standards. Visit the PHPMailer website at + http://phpmailer.codeworxtech.com/.
    + Please note: all of our focus is now on the PHPMailer for PHP5.
    + PS. While you are at it, please visit our sponsor's sites, click on their ads. + It helps offset some of our costs.
    + Want to help? We're looking for progressive developers to join our team of volunteer professionals working on PHPMailer. Our entire focus is on PHPMailer for PHP5, and our next major task is to enhance our + exception/error handling with PHP 5's object oriented try/throw/catch mechanisms. If you are interested, let us know.
    +
  • -
  • QuickCache. Originally authored by Jean Pierre Deckers as jpCache, QuickCache is an HTTP OpCode caching strategy that works on your entire site with only one line of code at the top of your script. The cached pages can be stored as files or as database objects. The benefits are absolutely astounding: bandwidth savings of up to 80% and screen display times increased by 8 - 10x. Visit the QuickCache website at - http://quickcache.codeworxtech.com/.
    -
    +
  • QuickCache. Originally authored by Jean Pierre Deckers as jpCache, QuickCache is an HTTP OpCode caching strategy that works on your entire site with only one line of code at the top of your script. The cached pages can be stored as files or as database objects. The benefits are absolutely astounding: bandwidth savings of up to 80% and screen display times increased by 8 - 10x. Visit the QuickCache website at + http://quickcache.codeworxtech.com/.
    +
  • -
  • QuickSkin. Originally authored by Philipp v. Criegern and named "SmartTemplate". The project was taken over by Manuel 'EndelWar' Dalla Lana and now by "codeworxtech". QuickSkin is one of the truly outstanding templating engines available, but has always been confused with Smarty Templating Engine. QuickSkin is even more relevant today than when it was launched. It's a small footprint with big impact on your projects. It features a built in caching technology, token based substitution, and works on the concept of one single HTML file as the template. The HTML template file can contain variable information making it one small powerful tool for your developer tool kit. Visit the QuickSkin website at - http://quickskin.codeworxtech.com/.
    -
    +
  • QuickSkin. Originally authored by Philipp v. Criegern and named "SmartTemplate". The project was taken over by Manuel 'EndelWar' Dalla Lana and now by "codeworxtech". QuickSkin is one of the truly outstanding templating engines available, but has always been confused with Smarty Templating Engine. QuickSkin is even more relevant today than when it was launched. It's a small footprint with big impact on your projects. It features a built in caching technology, token based substitution, and works on the concept of one single HTML file as the template. The HTML template file can contain variable information making it one small powerful tool for your developer tool kit. Visit the QuickSkin website at + http://quickskin.codeworxtech.com/.
    +
  • -
  • QuickTabs. If you read about the projects above, you'll get the sense that we are minimalists and that's pretty accurate. We prefer using tools that are small, efficient, and effective. We have no use for software bloat. QuickTabs came to life in several of our projects where we needed to display complex information in a simplified manner to users. It had to function something like a "wizard" interface, but with more flexibility to float from one item to another. We looked at various Ajax-based solutions, but found one annoying problem with Ajax - page reloads if switching between items (with corresponding data loss if changed by the customer). QuickTabs is our solution to this by presenting complex data in a Javascript show/hide div set. It's not a complex architecture, but it works! Visit the QuickTabs website at http://quicktabs.codeworxtech.com/.
  • +
  • QuickTabs. If you read about the projects above, you'll get the sense that we are minimalists and that's pretty accurate. We prefer using tools that are small, efficient, and effective. We have no use for software bloat. QuickTabs came to life in several of our projects where we needed to display complex information in a simplified manner to users. It had to function something like a "wizard" interface, but with more flexibility to float from one item to another. We looked at various Ajax-based solutions, but found one annoying problem with Ajax - page reloads if switching between items (with corresponding data loss if changed by the customer). QuickTabs is our solution to this by presenting complex data in a Javascript show/hide div set. It's not a complex architecture, but it works! Visit the QuickTabs website at http://quicktabs.codeworxtech.com/.

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

Opportunities with Codeworx Technologies:

    -
  • Resellers/Agents: We're always interested in talking with companies that +
  • Resellers/Agents: We're always interested in talking with companies that want to represent Codeworx Technologies in their markets. We also have private label programs for our commercial products (in certain circumstances).
  • Programmers/Developers: We are usually fully staffed, however, if you would like to be considered for a career with -Codeworx Technologies, we would be pleased to hear from you.
    -A few things to note:
    +Codeworx Technologies, we would be pleased to hear from you.
    +A few things to note:
      -
    • we do not hire contractors and we do not outsource (these are services we offer)
    • -
    • experience level does not matter: from fresh out of college to multi-year experience - it's your +
    • experience level does not matter: from fresh out of college to multi-year experience - it's your creative mind and a positive attitude we want
    • if you contact us looking for employment, include a cover letter, indicate what type of work/career you are looking for and expected compensation
    • if you are representing someone else looking for work, do not contact us. We have an exclusive relationship with a recruiting partner already and not interested in altering the arrangement. We will not hire your candidate under any circumstances unless they wish to approach us individually.
    • @@ -62,10 +111,10 @@ A few things to note:
  • Affiliates/Partnerships: We are interested in partnering with other firms who are leaders in their field. We clearly understand that successful companies are built on successful relationships in all industries world-wide. We currently have innovative relationships throughout the world that are mutually beneficial. Drop us a line and let's talk.
-Regards,
-Andy Prevost (aka, codeworxtech)
-codeworxtech@users.sourceforge.net
-
+Regards,
+Andy Prevost (aka, codeworxtech)
+codeworxtech@users.sourceforge.net
+
diff --git a/inc/phpmailer/docs/faq.html b/inc/phpmailer/docs/faq.html index 283e651789..54ac18370e 100644 --- a/inc/phpmailer/docs/faq.html +++ b/inc/phpmailer/docs/faq.html @@ -1,66 +1,67 @@ - - -phpmailer FAQ - - - - -

phpmailer FAQ

- -

-I'm using the SMTP mailer and I keep on getting a timeout message -well before the X seconds I set it for. What gives? -
-PHP versions 4.0.4pl1 and earlier have a bug in which sockets timeout -early. You can fix this by re-compiling PHP 4.0.4pl1 with this fix: -timeoutfix.diff. Otherwise you can wait -for the new PHP release. -

- -

-I am concerned that using include files will take up too much -processing time on my computer. How can I make it run faster? -
-PHP by itself is very fast. Much faster than ASP or JSP running on -the same type of server. This is because it has very little overhead compared -to its competitors and it pre-compiles all of -its code before it runs each script (in PHP4). However, all of -this compiling and re-compiling can take up a lot of valuable -computer resources. However, there are programs out there that compile -PHP code and store it in memory (or on mmaped files) to reduce the -processing immensely. Two of these: APC -(Alternative PHP Cache) and Afterburner -(Win32 download) -are excellent free tools that do just this. If you have the money -you might also try Zend Cache, it is -even faster than the open source varieties. All of these tools make your -scripts run faster while also reducing the load on your server. I have tried -them myself and they are quite stable too. -

- - -

-What mailer gives me the best performance? -
-On a single machine the mail() or sendmail mailers give you the best -performance because they do not have the added overhead of SMTP. -If you have you have your mail server on a another machine then -SMTP is your only option, but you do get the benefit of redundant -mail servers. -

- -

-When I try to attach a file with on my server I get a -"Could not find {file} on filesystem error". Why is this? -
-If you are using a Unix machine this is probably because the user -running your web server does not have read access to the directory -in question. If you are using Windows, then the problem probably is -that you have used single backslashes to denote directories ("\"). -A single backslash has a special meaning to PHP so these are not -valid. Instead use double backslashes ("\\") or a single forward -slash ("/"). -

- - - \ No newline at end of file + + +PHPMailer FAQ + + + +
+
+

PHPMailer FAQ

+
    + +
  • Q: I'm using the SMTP mailer and I keep on getting a timeout message + well before the X seconds I set it for. What gives?
    + A: PHP versions 4.0.4pl1 and earlier have a bug in which sockets timeout + early. You can fix this by re-compiling PHP 4.0.4pl1 with this fix: + timeoutfix.diff. Otherwise you can wait for the new PHP release.

  • + +
  • Q: I am concerned that using include files will take up too much + processing time on my computer. How can I make it run faster?
    + A: PHP by itself is very fast. Much faster than ASP or JSP running on + the same type of server. This is because it has very little overhead compared + to its competitors and it pre-compiles all of + its code before it runs each script (in PHP4). However, all of + this compiling and re-compiling can take up a lot of valuable + computer resources. However, there are programs out there that compile + PHP code and store it in memory (or on mmaped files) to reduce the + processing immensely. Two of these: APC + (Alternative PHP Cache) and Afterburner + (Win32 download) + are excellent free tools that do just this. If you have the money + you might also try Zend Cache, it is + even faster than the open source varieties. All of these tools make your + scripts run faster while also reducing the load on your server. I have tried + them myself and they are quite stable too.

  • + +
  • Q: What mailer gives me the best performance?
    + A: On a single machine the sendmail (or Qmail) is fastest overall. + Next fastest is mail() to give you the best performance. Both do not have the overhead of SMTP. + If you have you have your mail server on a another machine then + SMTP is your only option, but you do get the benefit of redundant mail servers.
    + If you are running a mailing list with thousands of names, the fastest mailers in order are: SMTP, sendmail (or Qmail), mail().

  • + +
  • Q: When I try to attach a file with on my server I get a + "Could not find {file} on filesystem error". Why is this?
    + A: If you are using a Unix machine this is probably because the user + running your web server does not have read access to the directory in question. If you are using Windows, + then the problem probably is that you have used single backslashes to denote directories (\). + A single backslash has a special meaning to PHP so these are not + valid. Instead use double backslashes ("\\") or a single forward + slash ("/").

  • + +
+ +
+
+ + + diff --git a/inc/phpmailer/docs/phpmailer_sm.gif b/inc/phpmailer/docs/phpmailer_sm.gif new file mode 100644 index 0000000000..0244d29900 Binary files /dev/null and b/inc/phpmailer/docs/phpmailer_sm.gif differ diff --git a/inc/phpmailer/docs/use_gmail.txt b/inc/phpmailer/docs/use_gmail.txt index 3f384eb0da..3669f5d232 100644 --- a/inc/phpmailer/docs/use_gmail.txt +++ b/inc/phpmailer/docs/use_gmail.txt @@ -1,40 +1,45 @@ -IsSMTP(); -$mail->SMTPAuth = true; // enable SMTP authentication -$mail->SMTPSecure = "ssl"; // sets the prefix to the servier -$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server -$mail->Port = 465; // set the SMTP port - -$mail->Username = "yourname@gmail.com"; // GMAIL username -$mail->Password = "password"; // GMAIL password - -$mail->From = "replyto@yourdomain.com"; -$mail->FromName = "Webmaster"; -$mail->Subject = "This is the subject"; -$mail->Body = "Hi,
This is the HTML BODY
"; //HTML Body -$mail->AltBody = "This is the body when user views in plain text format"; //Text Body - -$mail->WordWrap = 50; // set word wrap - -$mail->AddAddress("username@domain.com","First Last"); -$mail->AddReplyTo("replyto@yourdomain.com","Webmaster"); -$mail->AddAttachment("/path/to/file.zip"); // attachment -$mail->AddAttachment("/path/to/image.jpg", "new.jpg"); // attachment - -$mail->IsHTML(true); // send as HTML - -if(!$mail->Send()) { - echo "Mailer Error: " . $mail->ErrorInfo; -} else { - echo "Message has been sent"; -} - -?> +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->IsSMTP(); +$mail->SMTPAuth = true; // enable SMTP authentication +$mail->SMTPSecure = "ssl"; // sets the prefix to the servier +$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server +$mail->Port = 465; // set the SMTP port + +$mail->Username = "yourname@gmail.com"; // GMAIL username +$mail->Password = "password"; // GMAIL password + +$mail->From = "replyto@yourdomain.com"; +$mail->FromName = "Webmaster"; +$mail->Subject = "This is the subject"; +$mail->AltBody = "This is the body when user views in plain text format"; //Text Body +$mail->WordWrap = 50; // set word wrap + +$mail->MsgHTML($body); + +$mail->AddReplyTo("replyto@yourdomain.com","Webmaster"); + +$mail->AddAttachment("/path/to/file.zip"); // attachment +$mail->AddAttachment("/path/to/image.jpg", "new.jpg"); // attachment + +$mail->AddAddress("username@domain.com","First Last"); + +$mail->IsHTML(true); // send as HTML + +if(!$mail->Send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message has been sent"; +} + +?> diff --git a/inc/phpmailer/examples/index.html b/inc/phpmailer/examples/index.html index 1dbc47bec3..d0a8b9d952 100644 --- a/inc/phpmailer/examples/index.html +++ b/inc/phpmailer/examples/index.html @@ -1,73 +1,73 @@ -

The example file "test1.php" contents include:

-
- -<?php
-
-include_once('../class.phpmailer.php');
-
-$mail = new PHPMailer();
-
-$body = $mail->getFile('contents.html');
-
-$body = eregi_replace("[\]",'',$body);
-$subject = eregi_replace("[\]",'',$subject);
-
-$mail->From = "name@yourdomain.com";
-$mail->FromName = "First Last";
-
-$mail->Subject = "PHPMailer Test Subject";
-
-$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
-
-$mail->MsgHTML($body);
-
-$mail->AddAddress("whoto@otherdomain.com", "John Doe");
-
-if(!$mail->Send()) {
- echo 'Failed to send mail';
-} else {
- echo 'Mail sent';
-}
-
-?> -
-
-
-Although you could use full compabitility with PHPMailer 1.7.3, this example -shows how to use the new features. If you view 'contents.html', you will note -that there is a background image used in the <body tag as well as an image used -with a regular <img tag. Here's what the HTML file looks like:
-
-
- -<body background="images/bkgrnd.gif" style="margin: 0px;">
-<div style="width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;">
-<div align="center"><img src="images/phpmailer.gif" style="height: 90px; width: 340px"></div><br>
-<br>
- This is a test of PHPMailer v2.0.0 rc1.<br>
-<br>
-This particular example uses <strong>HTML</strong>, with a <div> tag and inline<br>
-styles.<br>
-<br>
-Also note the use of the PHPMailer at the top with no specific code to handle
-including it in the body of the email.</div>
-</body>
-
-
-
-A few things to notice in the PHP script that generates the email: -
    -
  • the use of $mail->AltBody is completely optional. If not used, PHPMailer - will use the HTML text with htmlentities().
  • -
  • the background= and <img src= images were processed without any directives - or methods from the PHP script
  • -
  • there is no specific code to define the image type ... that is handled - automatically by PHPMailer when it parses the images
  • -
  • we are using a new class method '$mail->MsgHTML($body)' ... that is what will handle the parsing of the images and creating the AltBody text
  • -
-

Of course, you can still use PHPMailer the same way you have in the past. -That provides full compatibility with all existing scripts, while new scripts -can take advantage of the new features.

-

Modify test1.php now with your own email address and try it out.

-To see what the email SHOULD look like in your HTML compatible email viewer: click here
- +

The example file "test_mail.php" contents include:

+
+ +<?php
+
+include_once('../class.phpmailer.php');
+
+$mail = new PHPMailer();
+
+$body = $mail->getFile('contents.html');
+
+$body = eregi_replace("[\]",'',$body);
+$subject = eregi_replace("[\]",'',$subject);
+
+$mail->From = "name@yourdomain.com";
+$mail->FromName = "First Last";
+
+$mail->Subject = "PHPMailer Test Subject";
+
+$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
+
+$mail->MsgHTML($body);
+
+$mail->AddAddress("whoto@otherdomain.com", "John Doe");
+
+if(!$mail->Send()) {
+ echo 'Failed to send mail';
+} else {
+ echo 'Mail sent';
+}
+
+?> +
+
+
+Although you could use full compabitility with PHPMailer 1.7.3, this example +shows how to use the new features. If you view 'contents.html', you will note +that there is a background image used in the <body tag as well as an image used +with a regular <img tag. Here's what the HTML file looks like:
+
+
+ +<body background="images/bkgrnd.gif" style="margin: 0px;">
+<div style="width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;">
+<div align="center"><img src="images/phpmailer.gif" style="height: 90px; width: 340px"></div><br>
+<br>
+ This is a test of PHPMailer v2.0.0 rc1.<br>
+<br>
+This particular example uses <strong>HTML</strong>, with a <div> tag and inline<br>
+styles.<br>
+<br>
+Also note the use of the PHPMailer at the top with no specific code to handle
+including it in the body of the email.</div>
+</body>
+
+
+
+A few things to notice in the PHP script that generates the email: +
    +
  • the use of $mail->AltBody is completely optional. If not used, PHPMailer + will use the HTML text with htmlentities().
  • +
  • the background= and <img src= images were processed without any directives + or methods from the PHP script
  • +
  • there is no specific code to define the image type ... that is handled + automatically by PHPMailer when it parses the images
  • +
  • we are using a new class method '$mail->MsgHTML($body)' ... that is what will handle the parsing of the images and creating the AltBody text
  • +
+

Of course, you can still use PHPMailer the same way you have in the past. +That provides full compatibility with all existing scripts, while new scripts +can take advantage of the new features.

+

Modify test_mail.php now with your own email address and try it out.

+To see what the email SHOULD look like in your HTML compatible email viewer: click here
+ diff --git a/inc/phpmailer/examples/test_gmail.php b/inc/phpmailer/examples/test_gmail.php new file mode 100644 index 0000000000..9b951f8695 --- /dev/null +++ b/inc/phpmailer/examples/test_gmail.php @@ -0,0 +1,45 @@ +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->IsSMTP(); +$mail->SMTPAuth = true; // enable SMTP authentication +$mail->SMTPSecure = "ssl"; // sets the prefix to the servier +$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server +$mail->Port = 465; // set the SMTP port for the GMAIL server + +$mail->Username = "yourusername@gmail.com"; // GMAIL username +$mail->Password = "yourpassword"; // GMAIL password + +$mail->AddReplyTo("yourusername@gmail.com","First Last"); + +$mail->From = "name@yourdomain.com"; +$mail->FromName = "First Last"; + +$mail->Subject = "PHPMailer Test Subject via gmail"; + +//$mail->Body = "Hi,
This is the HTML BODY
"; //HTML Body +$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test +$mail->WordWrap = 50; // set word wrap + +$mail->MsgHTML($body); + +$mail->AddAddress("whoto@otherdomain.com", "John Doe"); + +$mail->AddAttachment("images/phpmailer.gif"); // attachment + +$mail->IsHTML(true); // send as HTML + +if(!$mail->Send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} + +?> diff --git a/inc/phpmailer/examples/test_mail.php b/inc/phpmailer/examples/test_mail.php new file mode 100644 index 0000000000..e87056e917 --- /dev/null +++ b/inc/phpmailer/examples/test_mail.php @@ -0,0 +1,29 @@ +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->From = "name@yourdomain.com"; +$mail->FromName = "First Last"; + +$mail->Subject = "PHPMailer Test Subject via mail()"; + +$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test + +$mail->MsgHTML($body); + +$mail->AddAddress("whoto@otherdomain.com", "John Doe"); + +$mail->AddAttachment("images/phpmailer.gif"); // attachment + +if(!$mail->Send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} + +?> diff --git a/inc/phpmailer/examples/test_sendmail.php b/inc/phpmailer/examples/test_sendmail.php new file mode 100644 index 0000000000..f0311665e4 --- /dev/null +++ b/inc/phpmailer/examples/test_sendmail.php @@ -0,0 +1,30 @@ +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->IsSendmail(); // telling the class to use SendMail transport + +$mail->From = "name@yourdomain.com"; +$mail->FromName = "First Last"; + +$mail->Subject = "PHPMailer Test Subject via smtp"; + +$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test + +$mail->MsgHTML($body); + +$mail->AddAddress("whoto@otherdomain.com", "John Doe"); + +$mail->AddAttachment("images/phpmailer.gif"); // attachment + +if(!$mail->Send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} + +?> diff --git a/inc/phpmailer/examples/test_smtp.php b/inc/phpmailer/examples/test_smtp.php new file mode 100644 index 0000000000..189f8daa18 --- /dev/null +++ b/inc/phpmailer/examples/test_smtp.php @@ -0,0 +1,33 @@ +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->IsSMTP(); // telling the class to use SMTP +$mail->Host = "mail.yourdomain.com"; // SMTP server + +$mail->From = "name@yourdomain.com"; +$mail->FromName = "First Last"; + +$mail->Subject = "PHPMailer Test Subject via smtp"; + +$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test + +$mail->MsgHTML($body); + +$mail->AddAddress("whoto@otherdomain.com", "John Doe"); + +$mail->AddAttachment("images/phpmailer.gif"); // attachment + +if(!$mail->Send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-br.php b/inc/phpmailer/language/phpmailer.lang-br.php index 7e79e1866e..601d3b8101 100644 --- a/inc/phpmailer/language/phpmailer.lang-br.php +++ b/inc/phpmailer/language/phpmailer.lang-br.php @@ -1,21 +1,24 @@ + diff --git a/inc/phpmailer/language/phpmailer.lang-ca.php b/inc/phpmailer/language/phpmailer.lang-ca.php index 41516d5cf4..dbb22985ac 100644 --- a/inc/phpmailer/language/phpmailer.lang-ca.php +++ b/inc/phpmailer/language/phpmailer.lang-ca.php @@ -1,22 +1,24 @@ \ No newline at end of file +$PHPMAILER_LANG["provide_address"] = 'S\'ha de proveir almenys una adreça d\'email com a destinatari.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' mailer no està suportat'; +$PHPMAILER_LANG["execute"] = 'No es pot executar: '; +$PHPMAILER_LANG["instantiate"] = 'No s\'ha pogut crear una instància de la funció Mail.'; +$PHPMAILER_LANG["authenticate"] = 'Error SMTP: No s\'hapogut autenticar.'; +$PHPMAILER_LANG["from_failed"] = 'La(s) següent(s) adreces de remitent han fallat: '; +$PHPMAILER_LANG["recipients_failed"] = 'Error SMTP: Els següents destinataris han fallat: '; +$PHPMAILER_LANG["data_not_accepted"] = 'Error SMTP: Dades no acceptades.'; +$PHPMAILER_LANG["connect_host"] = 'Error SMTP: No es pot connectar al servidor SMTP.'; +$PHPMAILER_LANG["file_access"] = 'No es pot accedir a l\'arxiu: '; +$PHPMAILER_LANG["file_open"] = 'Error d\'Arxiu: No es pot obrir l\'arxiu: '; +$PHPMAILER_LANG["encoding"] = 'Codificació desconeguda: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-cz.php b/inc/phpmailer/language/phpmailer.lang-cz.php index 850026406a..ae82d2d040 100644 --- a/inc/phpmailer/language/phpmailer.lang-cz.php +++ b/inc/phpmailer/language/phpmailer.lang-cz.php @@ -1,24 +1,26 @@ \ No newline at end of file +$PHPMAILER_LANG["provide_address"] = 'Musíte zadat alespoò jednu ' . + 'emailovou adresu pøíjemce.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' mailový klient není podporován.'; +$PHPMAILER_LANG["execute"] = 'Nelze provést: '; +$PHPMAILER_LANG["instantiate"] = 'Nelze vytvoøit instanci emailové funkce.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Chyba autentikace.'; +$PHPMAILER_LANG["from_failed"] = 'Následující adresa From je nesprávná: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: Adresy pøíjemcù ' . + 'nejsou správné ' . +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data nebyla pøijata'; +$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Nelze navázat spojení se ' . + ' SMTP serverem.'; +$PHPMAILER_LANG["file_access"] = 'Soubor nenalezen: '; +$PHPMAILER_LANG["file_open"] = 'File Error: Nelze otevøít soubor pro ètení: '; +$PHPMAILER_LANG["encoding"] = 'Neznámé kódování: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-de.php b/inc/phpmailer/language/phpmailer.lang-de.php index d21836ad00..53c20e13c1 100644 --- a/inc/phpmailer/language/phpmailer.lang-de.php +++ b/inc/phpmailer/language/phpmailer.lang-de.php @@ -1,23 +1,26 @@ + diff --git a/inc/phpmailer/language/phpmailer.lang-dk.php b/inc/phpmailer/language/phpmailer.lang-dk.php index e7cf2ac524..fe60f314b1 100644 --- a/inc/phpmailer/language/phpmailer.lang-dk.php +++ b/inc/phpmailer/language/phpmailer.lang-dk.php @@ -1,24 +1,26 @@ */ $PHPMAILER_LANG = array(); -$PHPMAILER_LANG["provide_address"] = 'Du skal indtaste mindst en ' . - 'modtagers emailadresse.'; -$PHPMAILER_LANG["mailer_not_supported"] = ' mailer underst�ttes ikke.'; -$PHPMAILER_LANG["execute"] = 'Kunne ikke k�re: '; -$PHPMAILER_LANG["instantiate"] = 'Kunne ikke initialisere email funktionen.'; -$PHPMAILER_LANG["authenticate"] = 'SMTP fejl: Kunne ikke logge p�.'; -$PHPMAILER_LANG["from_failed"] = 'F�lgende afsenderadresse er forkert: '; -$PHPMAILER_LANG["recipients_failed"] = 'SMTP fejl: F�lgende' . - 'modtagere er forkerte: '; -$PHPMAILER_LANG["data_not_accepted"] = 'SMTP fejl: Data kunne ikke accepteres.'; -$PHPMAILER_LANG["connect_host"] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; -$PHPMAILER_LANG["file_access"] = 'Ingen adgang til fil: '; -$PHPMAILER_LANG["file_open"] = 'Fil fejl: Kunne ikke �bne filen: '; -$PHPMAILER_LANG["encoding"] = 'Ukendt encode-format: '; -?> \ No newline at end of file +$PHPMAILER_LANG["provide_address"] = 'Du skal indtaste mindst en ' . + 'modtagers emailadresse.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' mailer understøttes ikke.'; +$PHPMAILER_LANG["execute"] = 'Kunne ikke køre: '; +$PHPMAILER_LANG["instantiate"] = 'Kunne ikke initialisere email funktionen.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP fejl: Kunne ikke logge pÃ¥.'; +$PHPMAILER_LANG["from_failed"] = 'Følgende afsenderadresse er forkert: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP fejl: Følgende' . + 'modtagere er forkerte: '; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP fejl: Data kunne ikke accepteres.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; +$PHPMAILER_LANG["file_access"] = 'Ingen adgang til fil: '; +$PHPMAILER_LANG["file_open"] = 'Fil fejl: Kunne ikke Ã¥bne filen: '; +$PHPMAILER_LANG["encoding"] = 'Ukendt encode-format: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-en.php b/inc/phpmailer/language/phpmailer.lang-en.php index 2f45383fec..f7d4286d07 100644 --- a/inc/phpmailer/language/phpmailer.lang-en.php +++ b/inc/phpmailer/language/phpmailer.lang-en.php @@ -1,23 +1,25 @@ diff --git a/inc/phpmailer/language/phpmailer.lang-es.php b/inc/phpmailer/language/phpmailer.lang-es.php index 77cf15f79c..bebf632f02 100644 --- a/inc/phpmailer/language/phpmailer.lang-es.php +++ b/inc/phpmailer/language/phpmailer.lang-es.php @@ -1,23 +1,25 @@ \ No newline at end of file +$PHPMAILER_LANG["provide_address"] = 'Debe proveer al menos una ' . + 'dirección de email como destinatario.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' mailer no está soportado.'; +$PHPMAILER_LANG["execute"] = 'No puedo ejecutar: '; +$PHPMAILER_LANG["instantiate"] = 'No pude crear una instancia de la función Mail.'; +$PHPMAILER_LANG["authenticate"] = 'Error SMTP: No se pudo autentificar.'; +$PHPMAILER_LANG["from_failed"] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; +$PHPMAILER_LANG["recipients_failed"] = 'Error SMTP: Los siguientes ' . + 'destinatarios fallaron: '; +$PHPMAILER_LANG["data_not_accepted"] = 'Error SMTP: Datos no aceptados.'; +$PHPMAILER_LANG["connect_host"] = 'Error SMTP: No puedo conectar al servidor SMTP.'; +$PHPMAILER_LANG["file_access"] = 'No puedo acceder al archivo: '; +$PHPMAILER_LANG["file_open"] = 'Error de Archivo: No puede abrir el archivo: '; +$PHPMAILER_LANG["encoding"] = 'Codificación desconocida: '; +$PHPMAILER_LANG["signing"] = 'Error al firmar: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-et.php b/inc/phpmailer/language/phpmailer.lang-et.php index eb56de7217..3fd55953be 100644 --- a/inc/phpmailer/language/phpmailer.lang-et.php +++ b/inc/phpmailer/language/phpmailer.lang-et.php @@ -1,22 +1,24 @@ diff --git a/inc/phpmailer/language/phpmailer.lang-fi.php b/inc/phpmailer/language/phpmailer.lang-fi.php index d881080d48..e2bb497a2f 100644 --- a/inc/phpmailer/language/phpmailer.lang-fi.php +++ b/inc/phpmailer/language/phpmailer.lang-fi.php @@ -1,23 +1,25 @@ \ No newline at end of file +$PHPMAILER_LANG["provide_address"] = 'Aseta vähintään yksi vastaanottajan ' . + 'sähköpostiosoite.'; +$PHPMAILER_LANG["mailer_not_supported"] = 'postivälitintyyppiä ei tueta.'; +$PHPMAILER_LANG["execute"] = 'Suoritus epäonnistui: '; +$PHPMAILER_LANG["instantiate"] = 'mail-funktion luonti epäonnistui.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP-virhe: käyttäjätunnistus epäonnistui.'; +$PHPMAILER_LANG["from_failed"] = 'Seuraava lähettäjän osoite on virheellinen: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.'; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP-virhe: data on virheellinen.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP-virhe: yhteys palvelimeen ei onnistu.'; +$PHPMAILER_LANG["file_access"] = 'Seuraavaan tiedostoon ei ole oikeuksia: '; +$PHPMAILER_LANG["file_open"] = 'Tiedostovirhe: Ei voida avata tiedostoa: '; +$PHPMAILER_LANG["encoding"] = 'Tuntematon koodaustyyppi: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-fo.php b/inc/phpmailer/language/phpmailer.lang-fo.php index e015ced373..13b136fc76 100644 --- a/inc/phpmailer/language/phpmailer.lang-fo.php +++ b/inc/phpmailer/language/phpmailer.lang-fo.php @@ -1,25 +1,27 @@ diff --git a/inc/phpmailer/language/phpmailer.lang-fr.php b/inc/phpmailer/language/phpmailer.lang-fr.php index cf63443810..8ef292a52c 100644 --- a/inc/phpmailer/language/phpmailer.lang-fr.php +++ b/inc/phpmailer/language/phpmailer.lang-fr.php @@ -1,24 +1,26 @@ + diff --git a/inc/phpmailer/language/phpmailer.lang-hu.php b/inc/phpmailer/language/phpmailer.lang-hu.php index 5323aedcf4..8eafba7675 100644 --- a/inc/phpmailer/language/phpmailer.lang-hu.php +++ b/inc/phpmailer/language/phpmailer.lang-hu.php @@ -1,23 +1,25 @@ \ No newline at end of file +$PHPMAILER_LANG["provide_address"] = 'Meg kell adnod legalább egy ' . + 'címzett email címet.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' levelezõ nem támogatott.'; +$PHPMAILER_LANG["execute"] = 'Nem tudtam végrehajtani: '; +$PHPMAILER_LANG["instantiate"] = 'Nem sikerült példányosítani a mail funkciót.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP Hiba: Sikertelen autentikáció.'; +$PHPMAILER_LANG["from_failed"] = 'Az alábbi Feladó cím hibás: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP Hiba: Az alábbi ' . + 'címzettek hibásak: '; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Hiba: Nem elfogadható adat.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP Hiba: Nem tudtam csatlakozni az SMTP host-hoz.'; +$PHPMAILER_LANG["file_access"] = 'Nem sikerült elérni a következõ fájlt: '; +$PHPMAILER_LANG["file_open"] = 'Fájl Hiba: Nem sikerült megnyitni a következõ fájlt: '; +$PHPMAILER_LANG["encoding"] = 'Ismeretlen kódolás: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-it.php b/inc/phpmailer/language/phpmailer.lang-it.php index 26ef64dd1c..2fb6a5d255 100644 --- a/inc/phpmailer/language/phpmailer.lang-it.php +++ b/inc/phpmailer/language/phpmailer.lang-it.php @@ -8,21 +8,23 @@ $PHPMAILER_LANG = array(); -$PHPMAILER_LANG["provide_address"] = 'Deve essere fornito almeno un'. - ' indirizzo ricevente'; +$PHPMAILER_LANG["provide_address"] = 'Deve essere fornito almeno un'. + ' indirizzo ricevente'; $PHPMAILER_LANG["mailer_not_supported"] = 'Mailer non supportato'; -$PHPMAILER_LANG["execute"] = "Impossibile eseguire l'operazione: "; -$PHPMAILER_LANG["instantiate"] = 'Impossibile istanziare la funzione mail'; -$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Impossibile autenticarsi.'; -$PHPMAILER_LANG["from_failed"] = 'I seguenti indirizzi mittenti hanno'. - ' generato errore: '; -$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: I seguenti indirizzi'. - 'destinatari hanno generato errore: '; -$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data non accettati dal'. - 'server.'; -$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Impossibile connettersi'. - ' all\'host SMTP.'; -$PHPMAILER_LANG["file_access"] = 'Impossibile accedere al file: '; -$PHPMAILER_LANG["file_open"] = 'File Error: Impossibile aprire il file: '; -$PHPMAILER_LANG["encoding"] = 'Encoding set dei caratteri sconosciuto: '; +$PHPMAILER_LANG["execute"] = "Impossibile eseguire l'operazione: "; +$PHPMAILER_LANG["instantiate"] = 'Impossibile istanziare la funzione mail'; +$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Impossibile autenticarsi.'; +$PHPMAILER_LANG["from_failed"] = 'I seguenti indirizzi mittenti hanno'. + ' generato errore: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: I seguenti indirizzi'. + 'destinatari hanno generato errore: '; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data non accettati dal'. + 'server.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Impossibile connettersi'. + ' all\'host SMTP.'; +$PHPMAILER_LANG["file_access"] = 'Impossibile accedere al file: '; +$PHPMAILER_LANG["file_open"] = 'File Error: Impossibile aprire il file: '; +$PHPMAILER_LANG["encoding"] = 'Encoding set dei caratteri sconosciuto: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + ?> diff --git a/inc/phpmailer/language/phpmailer.lang-ja.php b/inc/phpmailer/language/phpmailer.lang-ja.php index 75e3843622..2e188eb6bd 100644 Binary files a/inc/phpmailer/language/phpmailer.lang-ja.php and b/inc/phpmailer/language/phpmailer.lang-ja.php differ diff --git a/inc/phpmailer/language/phpmailer.lang-nl.php b/inc/phpmailer/language/phpmailer.lang-nl.php index 13aa73362c..262b543a43 100644 --- a/inc/phpmailer/language/phpmailer.lang-nl.php +++ b/inc/phpmailer/language/phpmailer.lang-nl.php @@ -1,23 +1,25 @@ \ No newline at end of file +$PHPMAILER_LANG["execute"] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG["instantiate"] = 'Kon mail functie niet initialiseren.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP Fout: authenticatie mislukt.'; +$PHPMAILER_LANG["from_failed"] = 'De volgende afzender adressen zijn mislukt: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP Fout: De volgende ' . + 'ontvangers zijn mislukt: '; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Fout: Data niet geaccepteerd.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP Fout: Kon niet verbinden met SMTP host.'; +$PHPMAILER_LANG["file_access"] = 'Kreeg geen toegang tot bestand: '; +$PHPMAILER_LANG["file_open"] = 'Bestandsfout: Kon bestand niet openen: '; +$PHPMAILER_LANG["encoding"] = 'Onbekende codering: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-no.php b/inc/phpmailer/language/phpmailer.lang-no.php index c8767a223f..9a2534151d 100644 --- a/inc/phpmailer/language/phpmailer.lang-no.php +++ b/inc/phpmailer/language/phpmailer.lang-no.php @@ -6,18 +6,20 @@ $PHPMAILER_LANG = array(); -$PHPMAILER_LANG["provide_address"] = 'Du m� ha med minst en' . - 'mottager adresse.'; +$PHPMAILER_LANG["provide_address"] = 'Du mÃ¥ ha med minst en' . + 'mottager adresse.'; $PHPMAILER_LANG["mailer_not_supported"] = ' mailer er ikke supportert.'; -$PHPMAILER_LANG["execute"] = 'Kunne ikke utf�re: '; -$PHPMAILER_LANG["instantiate"] = 'Kunne ikke instantiate mail funksjonen.'; -$PHPMAILER_LANG["authenticate"] = 'SMTP Feil: Kunne ikke authentisere.'; -$PHPMAILER_LANG["from_failed"] = 'F�lgende Fra feilet: '; -$PHPMAILER_LANG["recipients_failed"] = 'SMTP Feil: F�lgende' . - 'mottagere feilet: '; -$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Feil: Data ble ikke akseptert.'; -$PHPMAILER_LANG["connect_host"] = 'SMTP Feil: Kunne ikke koble til SMTP host.'; -$PHPMAILER_LANG["file_access"] = 'Kunne ikke f� tilgang til filen: '; -$PHPMAILER_LANG["file_open"] = 'Fil feil: Kunne ikke �pne filen: '; -$PHPMAILER_LANG["encoding"] = 'Ukjent encoding: '; +$PHPMAILER_LANG["execute"] = 'Kunne ikke utføre: '; +$PHPMAILER_LANG["instantiate"] = 'Kunne ikke instantiate mail funksjonen.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP Feil: Kunne ikke authentisere.'; +$PHPMAILER_LANG["from_failed"] = 'Følgende Fra feilet: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP Feil: Følgende' . + 'mottagere feilet: '; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Feil: Data ble ikke akseptert.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP Feil: Kunne ikke koble til SMTP host.'; +$PHPMAILER_LANG["file_access"] = 'Kunne ikke fÃ¥ tilgang til filen: '; +$PHPMAILER_LANG["file_open"] = 'Fil feil: Kunne ikke Ã¥pne filen: '; +$PHPMAILER_LANG["encoding"] = 'Ukjent encoding: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + ?> diff --git a/inc/phpmailer/language/phpmailer.lang-pl.php b/inc/phpmailer/language/phpmailer.lang-pl.php index 61b7deb89c..e2f86ff195 100644 --- a/inc/phpmailer/language/phpmailer.lang-pl.php +++ b/inc/phpmailer/language/phpmailer.lang-pl.php @@ -1,24 +1,25 @@ \ No newline at end of file +?> diff --git a/inc/phpmailer/language/phpmailer.lang-ro.php b/inc/phpmailer/language/phpmailer.lang-ro.php index a330b4ad6e..335021719d 100644 --- a/inc/phpmailer/language/phpmailer.lang-ro.php +++ b/inc/phpmailer/language/phpmailer.lang-ro.php @@ -1,6 +1,6 @@ @@ -8,16 +8,18 @@ $PHPMAILER_LANG = array(); -$PHPMAILER_LANG["provide_address"] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).'; +$PHPMAILER_LANG["provide_address"] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).'; $PHPMAILER_LANG["mailer_not_supported"] = ' mailer nu este suportat.'; -$PHPMAILER_LANG["execute"] = 'Nu pot executa: '; -$PHPMAILER_LANG["instantiate"] = 'Nu am putut instantia functia mail.'; -$PHPMAILER_LANG["authenticate"] = 'Eroare SMTP: Nu a functionat autentificarea.'; -$PHPMAILER_LANG["from_failed"] = 'Urmatoarele adrese From au dat eroare: '; -$PHPMAILER_LANG["recipients_failed"] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: '; -$PHPMAILER_LANG["data_not_accepted"] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.'; -$PHPMAILER_LANG["connect_host"] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.'; -$PHPMAILER_LANG["file_access"] = 'Nu pot accesa fisierul: '; -$PHPMAILER_LANG["file_open"] = 'Eroare de fisier: Nu pot deschide fisierul: '; -$PHPMAILER_LANG["encoding"] = 'Encodare necunoscuta: '; +$PHPMAILER_LANG["execute"] = 'Nu pot executa: '; +$PHPMAILER_LANG["instantiate"] = 'Nu am putut instantia functia mail.'; +$PHPMAILER_LANG["authenticate"] = 'Eroare SMTP: Nu a functionat autentificarea.'; +$PHPMAILER_LANG["from_failed"] = 'Urmatoarele adrese From au dat eroare: '; +$PHPMAILER_LANG["recipients_failed"] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: '; +$PHPMAILER_LANG["data_not_accepted"] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.'; +$PHPMAILER_LANG["connect_host"] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.'; +$PHPMAILER_LANG["file_access"] = 'Nu pot accesa fisierul: '; +$PHPMAILER_LANG["file_open"] = 'Eroare de fisier: Nu pot deschide fisierul: '; +$PHPMAILER_LANG["encoding"] = 'Encodare necunoscuta: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + ?> diff --git a/inc/phpmailer/language/phpmailer.lang-ru.php b/inc/phpmailer/language/phpmailer.lang-ru.php index 46f7322d5d..2e1b14839b 100644 --- a/inc/phpmailer/language/phpmailer.lang-ru.php +++ b/inc/phpmailer/language/phpmailer.lang-ru.php @@ -5,19 +5,22 @@ */ $PHPMAILER_LANG = array(); -$PHPMAILER_LANG["provide_address"] = '����������, ������� ���� �� ���� ����� e-mail ' . - '����������.'; -$PHPMAILER_LANG["mailer_not_supported"] = ' - �������� ������ �� ��������������.'; -$PHPMAILER_LANG["execute"] = '���������� ��������� �������: '; -$PHPMAILER_LANG["instantiate"] = '���������� ��������� ������� mail.'; -$PHPMAILER_LANG["authenticate"] = '������ SMTP: ������ �����������.'; -$PHPMAILER_LANG["from_failed"] = '�������� ����� �����������: '; -$PHPMAILER_LANG["recipients_failed"] = '������ SMTP: �������� �� ��������� ' . - '������� ����������� �� �������: '; -$PHPMAILER_LANG["data_not_accepted"] = '������ SMTP: ������ �� �������.'; -$PHPMAILER_LANG["connect_host"] = '������ SMTP: �� ������� ������������ � ������� SMTP.'; -$PHPMAILER_LANG["file_access"] = '��� ������� � �����: '; -$PHPMAILER_LANG["file_open"] = '�������� ������: �� ������� ������� ����: '; -$PHPMAILER_LANG["encoding"] = '����������� ��� ���������: '; + +$PHPMAILER_LANG["provide_address"] = 'Ïîæàëóéñòà, ââåäèòå õîòÿ áû îäèí àäðåñ e-mail ' . + 'ïîëó÷àòåëÿ.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' - ïî÷òîâûé ñåðâåð íå ïîääåðæèâàåòñÿ.'; +$PHPMAILER_LANG["execute"] = 'Íåâîçìîæíî âûïîëíèòü êîìàíäó: '; +$PHPMAILER_LANG["instantiate"] = 'Íåâîçìîæíî çàïóñòèòü ôóíêöèþ mail.'; +$PHPMAILER_LANG["authenticate"] = 'Îøèáêà SMTP: îøèáêà àâòîðèçàöèè.'; +$PHPMAILER_LANG["from_failed"] = 'Íåâåðíûé àäðåñ îòïðàâèòåëÿ: '; +$PHPMAILER_LANG["recipients_failed"] = 'Îøèáêà SMTP: îòïðàâêà ïî ñëåäóþùèì ' . + 'àäðåñàì ïîëó÷àòåëåé íå óäàëàñü: '; +$PHPMAILER_LANG["data_not_accepted"] = 'Îøèáêà SMTP: äàííûå íå ïðèíÿòû.'; +$PHPMAILER_LANG["connect_host"] = 'Îøèáêà SMTP: íå óäàåòñÿ ïîäêëþ÷èòüñÿ ê ñåðâåðó SMTP.'; +$PHPMAILER_LANG["file_access"] = 'Íåò äîñòóïà ê ôàéëó: '; +$PHPMAILER_LANG["file_open"] = 'Ôàéëîâàÿ îøèáêà: íå óäàåòñÿ îòêðûòü ôàéë: '; +$PHPMAILER_LANG["encoding"] = 'Íåèçâåñòíûé âèä êîäèðîâêè: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + ?> diff --git a/inc/phpmailer/language/phpmailer.lang-se.php b/inc/phpmailer/language/phpmailer.lang-se.php index 44042a8f19..e61bbb127a 100644 --- a/inc/phpmailer/language/phpmailer.lang-se.php +++ b/inc/phpmailer/language/phpmailer.lang-se.php @@ -1,24 +1,26 @@ + * Author: Johan Linnér */ $PHPMAILER_LANG = array(); -$PHPMAILER_LANG["provide_address"] = 'Du m�ste ange minst en ' . - 'mottagares e-postadress.'; -$PHPMAILER_LANG["mailer_not_supported"] = ' mailer st�ds inte.'; -$PHPMAILER_LANG["execute"] = 'Kunde inte k�ra: '; -$PHPMAILER_LANG["instantiate"] = 'Kunde inte initiera e-postfunktion.'; -$PHPMAILER_LANG["authenticate"] = 'SMTP fel: Kunde inte autentisera.'; -$PHPMAILER_LANG["from_failed"] = 'F�ljande avs�ndaradress �r felaktig: '; -$PHPMAILER_LANG["recipients_failed"] = 'SMTP fel: F�ljande ' . - 'mottagare �r felaktig: '; -$PHPMAILER_LANG["data_not_accepted"] = 'SMTP fel: Data accepterades inte.'; -$PHPMAILER_LANG["connect_host"] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; -$PHPMAILER_LANG["file_access"] = 'Ingen �tkomst till fil: '; -$PHPMAILER_LANG["file_open"] = 'Fil fel: Kunde inte �ppna fil: '; -$PHPMAILER_LANG["encoding"] = 'Ok�nt encode-format: '; -?> \ No newline at end of file +$PHPMAILER_LANG["provide_address"] = 'Du måste ange minst en ' . + 'mottagares e-postadress.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' mailer stöds inte.'; +$PHPMAILER_LANG["execute"] = 'Kunde inte köra: '; +$PHPMAILER_LANG["instantiate"] = 'Kunde inte initiera e-postfunktion.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP fel: Kunde inte autentisera.'; +$PHPMAILER_LANG["from_failed"] = 'Följande avsändaradress är felaktig: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP fel: Följande ' . + 'mottagare är felaktig: '; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP fel: Data accepterades inte.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; +$PHPMAILER_LANG["file_access"] = 'Ingen åtkomst till fil: '; +$PHPMAILER_LANG["file_open"] = 'Fil fel: Kunde inte öppna fil: '; +$PHPMAILER_LANG["encoding"] = 'Okänt encode-format: '; +$PHPMAILER_LANG["signing"] = 'Signing Error: '; + +?> diff --git a/inc/phpmailer/language/phpmailer.lang-tr.php b/inc/phpmailer/language/phpmailer.lang-tr.php index 6bd3c0c85a..c8f388eec0 100644 --- a/inc/phpmailer/language/phpmailer.lang-tr.php +++ b/inc/phpmailer/language/phpmailer.lang-tr.php @@ -1,25 +1,26 @@ \ No newline at end of file +?>