]> git.mjollnir.org Git - moodle.git/commitdiff
New phpmailer 1.7.2 merged from STABLE
authormoodler <moodler>
Sat, 25 Sep 2004 16:02:38 +0000 (16:02 +0000)
committermoodler <moodler>
Sat, 25 Sep 2004 16:02:38 +0000 (16:02 +0000)
13 files changed:
lib/phpmailer/ChangeLog.txt
lib/phpmailer/README
lib/phpmailer/class.phpmailer.php
lib/phpmailer/language/phpmailer.lang-cz.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-de.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-en.php
lib/phpmailer/language/phpmailer.lang-es.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-fr.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-it.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-nl.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-no.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-se.php [new file with mode: 0755]
lib/phpmailer/language/phpmailer.lang-tr.php [new file with mode: 0755]

index 5753e97ce6022ae17b51e9b975be65613af2e495..254971167bef79d61a3199ed71bb91c0ca7feab9 100644 (file)
@@ -1,5 +1,22 @@
 ChangeLog
 
+Version 1.72 (Wed, May 25 2004)
+* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations.
+* Received: Removed this method because spam filter programs like 
+SpamAssassin reject this header.
+* Fixed error count bug.
+* SetLanguage default is now "language/".
+* Fixed magic_quotes_runtime bug.
+
+Version 1.71 (Tue, Jul 28 2003)
+* Made several speed enhancements
+* Added German and Italian translation files
+* Fixed HELO/AUTH bugs on keep-alive connects
+* Now provides an error message if language file does not load
+* Fixed attachment EOL bug
+* Updated some unclear documentation
+* Added additional tests and improved others
+
 Version 1.70 (Mon, Jun 20 2003)
 * Added SMTP keep-alive support
 * Added IsError method for error detection
index 137349aff1e60c4250156161a0a5a666ec8b3bca..de5876fc9aebef14067d4a59ee86ad64621faf4c 100644 (file)
-PHPMailer\r
-Full Featured Email Transfer Class for PHP\r
-==========================================\r
-\r
-http://phpmailer.sourceforge.net/\r
-\r
-This software is licenced under the LGPL.  Please read LICENSE for information on the\r
-software availability and distribution.\r
-\r
-Class Features:\r
-- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs\r
-- Redundant SMTP servers\r
-- Multipart/alternative emails for mail clients that do not read HTML email\r
-- Support for 8bit, base64, binary, and quoted-printable encoding\r
-- Uses the same methods as the very popular AspEmail active server (COM) component\r
-- SMTP authentication\r
-- Native language support\r
-- Word wrap, and more!\r
-\r
-Why you might need it:\r
-\r
-Many PHP developers utilize email in their code.  The only PHP function\r
-that supports this is the mail() function.  However, it does not expose\r
-any of the popular features that many email clients use nowadays like\r
-HTML-based emails and attachments. There are two proprietary\r
-development tools out there that have all the functionality built into\r
-easy to use classes: AspEmail(tm) and AspMail.  Both of these\r
-programs are COM components only available on Windows.  They are also a\r
-little pricey for smaller projects.\r
-\r
-Since I do Linux development I\92ve missed these tools for my PHP coding.\r
-So I built a version myself that implements the same methods (object\r
-calls) that the Windows-based components do. It is open source and the\r
-LGPL license allows you to place the class in your proprietary PHP\r
-projects.\r
-\r
-\r
-Installation:\r
-\r
-Copy class.phpmailer.php into your php.ini include_path. If you are\r
-using the SMTP mailer then place class.smtp.php in your path as well.\r
-In the language directory you will find several files like \r
-phpmailer.lang-en.php.  If you look right before the .php extension \r
-that there are two letters.  These represent the language type of the \r
-translation file.  For instance "en" is the English file and "br" is \r
-the Portuguese file.  Chose the file that best fits with your language \r
-and place it in the PHP include path.  If your language is English \r
-then you have nothing more to do.  If it is a different language then \r
-you must point PHPMailer to the correct translation.  To do this, call \r
-the PHPMailer SetLanguage method like so:\r
-\r
-// To load the Portuguese version\r
-$mail->SetLanguage("br", "/optional/path/to/language/directory");\r
-\r
-That's it.  You should now be ready to use PHPMailer!\r
-\r
-\r
-A Simple Example:\r
-\r
-<?php\r
-require("class.phpmailer.php");\r
-\r
-$mail = new PHPMailer();\r
-\r
-$mail->IsSMTP();                                      // set mailer to use SMTP\r
-$mail->Host = "smtp1.example.com;smtp2.example.com";  // specify main and backup server\r
-$mail->SMTPAuth = true     // turn on SMTP authentication\r
-$mail->Username = "jswan"  // SMTP username\r
-$mail->Password = "secret" // SMTP password\r
-\r
-$mail->From = "from@example.com";\r
-$mail->FromName = "Mailer";\r
-$mail->AddAddress("josh@example.net", "Josh Adams");\r
-$mail->AddAddress("ellen@example.com");                  // name is optional\r
-$mail->AddReplyTo("info@example.com", "Information");\r
-\r
-$mail->WordWrap = 50;                                 // set word wrap to 50 characters\r
-$mail->AddAttachment("/var/tmp/file.tar.gz");         // add attachments\r
-$mail->AddAttachment("/tmp/image.jpg", "new.jpg");    // optional name\r
-$mail->IsHTML(true);                                  // set email format to HTML\r
-\r
-$mail->Subject = "Here is the subject";\r
-$mail->Body    = "This is the HTML message body <b>in bold!</b>";\r
-$mail->AltBody = "This is the body in plain text for non-HTML mail clients";\r
-\r
-if(!$mail->Send())\r
-{\r
-   echo "Message could not be sent. <p>";\r
-   echo "Mailer Error: " . $mail->ErrorInfo;\r
-   exit;\r
-}\r
-\r
-echo "Message has been sent";\r
-?>\r
-\r
-CHANGELOG\r
-\r
-See ChangeLog.txt\r
-\r
-Download: http://sourceforge.net/project/showfiles.php?group_id=26031\r
-\r
-Brent R. Matzelle\r
+PHPMailer
+Full Featured Email Transfer Class for PHP
+==========================================
+
+http://phpmailer.sourceforge.net/
+
+This software is licenced under the LGPL.  Please read LICENSE for information on the
+software availability and distribution.
+
+Class Features:
+- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
+- Redundant SMTP servers
+- Multipart/alternative emails for mail clients that do not read HTML email
+- Support for 8bit, base64, binary, and quoted-printable encoding
+- Uses the same methods as the very popular AspEmail active server (COM) component
+- SMTP authentication
+- Native language support
+- Word wrap, and more!
+
+Why you might need it:
+
+Many PHP developers utilize email in their code.  The only PHP function
+that supports this is the mail() function.  However, it does not expose
+any of the popular features that many email clients use nowadays like
+HTML-based emails and attachments. There are two proprietary
+development tools out there that have all the functionality built into
+easy to use classes: AspEmail(tm) and AspMail.  Both of these
+programs are COM components only available on Windows.  They are also a
+little pricey for smaller projects.
+
+Since I do Linux development I\92ve missed these tools for my PHP coding.
+So I built a version myself that implements the same methods (object
+calls) that the Windows-based components do. It is open source and the
+LGPL license allows you to place the class in your proprietary PHP
+projects.
+
+
+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 
+the PHPMailer SetLanguage method like so:
+
+// To load the Portuguese version
+$mail->SetLanguage("br", "/optional/path/to/language/directory/");
+
+That's it.  You should now be ready to use PHPMailer!
+
+
+A Simple Example:
+
+<?php
+require("class.phpmailer.php");
+
+$mail = new PHPMailer();
+
+$mail->IsSMTP();                                      // set mailer to use SMTP
+$mail->Host = "smtp1.example.com;smtp2.example.com";  // specify main and backup server
+$mail->SMTPAuth = true;     // turn on SMTP authentication
+$mail->Username = "jswan";  // SMTP username
+$mail->Password = "secret"; // SMTP password
+
+$mail->From = "from@example.com";
+$mail->FromName = "Mailer";
+$mail->AddAddress("josh@example.net", "Josh Adams");
+$mail->AddAddress("ellen@example.com");                  // name is optional
+$mail->AddReplyTo("info@example.com", "Information");
+
+$mail->WordWrap = 50;                                 // set word wrap to 50 characters
+$mail->AddAttachment("/var/tmp/file.tar.gz");         // add attachments
+$mail->AddAttachment("/tmp/image.jpg", "new.jpg");    // optional name
+$mail->IsHTML(true);                                  // set email format to HTML
+
+$mail->Subject = "Here is the subject";
+$mail->Body    = "This is the HTML message body <b>in bold!</b>";
+$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
+
+if(!$mail->Send())
+{
+   echo "Message could not be sent. <p>";
+   echo "Mailer Error: " . $mail->ErrorInfo;
+   exit;
+}
+
+echo "Message has been sent";
+?>
+
+CHANGELOG
+
+See ChangeLog.txt
+
+Download: http://sourceforge.net/project/showfiles.php?group_id=26031
+
+Brent R. Matzelle
index 4e6a7079af10a135b803be1e0dbe8ee16cc72ec0..9c9200faa019ec08c38be5c5886a702ca6caf4f2 100644 (file)
@@ -67,8 +67,8 @@ class PHPMailer
     var $FromName           = "Root User";
 
     /**
-     * Sets the Sender email of the message. If not empty, will be sent via -f to sendmail
-     * or as 'MAIL FROM' in smtp mode.
+     * Sets the Sender email (Return-Path) of the message.  If not empty,
+     * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
      * @var string
      */
     var $Sender            = "";
@@ -79,12 +79,6 @@ class PHPMailer
      */
     var $Subject           = "";
 
-    /**
-     * Sets the Precedence level of this email.  "bulk" will prevent some bounces
-     * @var string
-     */
-    var $Precedence        = "";
-
     /**
      * Sets the Body of the message.  This can be either an HTML or text body.
      * If HTML then run IsHTML(true).
@@ -131,7 +125,7 @@ class PHPMailer
      *  Holds PHPMailer version.
      *  @var string
      */
-    var $Version           = "1.70";
+    var $Version           = "1.72";
 
     /**
      * Sets the email address that a reading confirmation will be sent.
@@ -147,7 +141,6 @@ class PHPMailer
      */
     var $Hostname          = "";
 
-
     /////////////////////////////////////////////////
     // SMTP VARIABLES
     /////////////////////////////////////////////////
@@ -350,6 +343,7 @@ class PHPMailer
     function Send() {
         $header = "";
         $body = "";
+        $result = true;
 
         if((count($this->to) + count($this->cc) + count($this->bcc)) < 1)
         {
@@ -361,6 +355,7 @@ class PHPMailer
         if(!empty($this->AltBody))
             $this->ContentType = "multipart/alternative";
 
+        $this->error_count = 0; // reset errors
         $this->SetMessageType();
         $header .= $this->CreateHeader();
         $body = $this->CreateBody();
@@ -368,28 +363,24 @@ class PHPMailer
         if($body == "") { return false; }
 
         // Choose the mailer
-        if($this->Mailer == "sendmail")
-        {
-          if(!$this->SendmailSend($header, $body))
-              return false;
-        }
-        elseif($this->Mailer == "mail")
-        {
-          if(!$this->MailSend($header, $body))
-              return false;
-        }
-        elseif($this->Mailer == "smtp")
-        {
-          if(!$this->SmtpSend($header, $body))
-              return false;
-        }
-        else
+        switch($this->Mailer)
         {
+            case "sendmail":
+                $result = $this->SendmailSend($header, $body);
+                break;
+            case "mail":
+                $result = $this->MailSend($header, $body);
+                break;
+            case "smtp":
+                $result = $this->SmtpSend($header, $body);
+                break;
+            default:
             $this->SetError($this->Mailer . $this->Lang("mailer_not_supported"));
-            return false;
+                $result = false;
+                break;
         }
 
-        return true;
+        return $result;
     }
     
     /**
@@ -428,21 +419,20 @@ class PHPMailer
      * @return bool
      */
     function MailSend($header, $body) {
-        // Cannot add Bcc's to the $to
-        $to = $this->to[0][0]; // no extra comma
-        for($i = 1; $i < count($this->to); $i++)
-            $to .= sprintf(",%s", $this->to[$i][0]);
-
-        if ($this->Sender != "" && PHP_VERSION >= "4.0")
+        $to = "";
+        for($i = 0; $i < count($this->to); $i++)
         {
-            $old_from = ini_get("sendmail_from");
-            ini_set("sendmail_from", $this->Sender);
+            if($i != 0) { $to .= ", "; }
+            $to .= $this->to[$i][0];
         }
 
-        if ($this->Sender != "" && PHP_VERSION >= "4.0.5")
+        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);
-            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header, $params);
+            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, 
+                        $header, $params);
         }
         else
             $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);
@@ -467,33 +457,12 @@ class PHPMailer
      * @return bool
      */
     function SmtpSend($header, $body) {
-        // Include SMTP class code, but not twice
         include_once($this->PluginDir . "class.smtp.php");
         $error = "";
         $bad_rcpt = array();
 
-        if($this->smtp == NULL)
-        {
-            if(!$this->SmtpConnect())
-                return false;
-        }
-
-        // Must perform HELO before authentication
-        if ($this->Helo != '')
-            $this->smtp->Hello($this->Helo);
-        else
-            $this->smtp->Hello($this->ServerHostname());
-
-        // If user requests SMTP authentication
-        if($this->SMTPAuth)
-        {
-            if(!$this->smtp->Authenticate($this->Username, $this->Password))
-            {
-                $this->SetError($this->Lang("authenticate"));
-                $this->smtp->Reset();
-                return false;
-            }
-        }
+        if(!$this->SmtpConnect())
+            return false;
 
         $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender;
         if(!$this->smtp->Mail($smtp_from))
@@ -521,8 +490,7 @@ class PHPMailer
                 $bad_rcpt[] = $this->bcc[$i][0];
         }
 
-        // Create error message
-        if(count($bad_rcpt) > 0)
+        if(count($bad_rcpt) > 0) // Create error message
         {
             for($i = 0; $i < count($bad_rcpt); $i++)
             {
@@ -575,7 +543,24 @@ class PHPMailer
             }
 
             if($this->smtp->Connect($host, $port, $this->Timeout))
+            {
+                if ($this->Helo != '')
+                    $this->smtp->Hello($this->Helo);
+                else
+                    $this->smtp->Hello($this->ServerHostname());
+        
+                if($this->SMTPAuth)
+                {
+                    if(!$this->smtp->Authenticate($this->Username, 
+                                                  $this->Password))
+                    {
+                        $this->SetError($this->Lang("authenticate"));
+                        $this->smtp->Reset();
+                        $connection = false;
+                    }
+                }
                 $connection = true;
+            }
             $index++;
         }
         if(!$connection)
@@ -608,7 +593,7 @@ class PHPMailer
      * @access public
      * @return bool
      */
-    function SetLanguage($lang_type, $lang_path = "") {
+    function SetLanguage($lang_type, $lang_path = "language/") {
         if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php'))
             include($lang_path.'phpmailer.lang-'.$lang_type.'.php');
         else if(file_exists($lang_path.'phpmailer.lang-en.php'))
@@ -638,11 +623,9 @@ class PHPMailer
         if(count($addr) > 1)
         {
             for($i = 1; $i < count($addr); $i++)
-                $addr_str .= sprintf(", %s", $this->AddrFormat($addr[$i]));
-            $addr_str .= $this->LE;
+                $addr_str .= ", " . $this->AddrFormat($addr[$i]);
         }
-        else
-            $addr_str .= $this->LE;
+        $addr_str .= $this->LE;
 
         return $addr_str;
     }
@@ -656,7 +639,10 @@ class PHPMailer
         if(empty($addr[1]))
             $formatted = $addr[0];
         else
-            $formatted = sprintf('%s <%s>', $this->EncodeHeader($addr[1], 'phrase'), $addr[0]);
+        {
+            $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . 
+                         $addr[0] . ">";
+        }
 
         return $formatted;
     }
@@ -776,7 +762,6 @@ class PHPMailer
         $this->boundary[1] = "b1_" . $uniq_id;
         $this->boundary[2] = "b2_" . $uniq_id;
 
-        $result .= $this->Received();
         $result .= $this->HeaderLine("Date", $this->RFCDate());
         if($this->Sender == "")
             $result .= $this->HeaderLine("Return-Path", trim($this->From));
@@ -790,6 +775,8 @@ class PHPMailer
                 $result .= $this->AddrAppend("To", $this->to);
             else if (count($this->cc) == 0)
                 $result .= $this->HeaderLine("To", "undisclosed-recipients:;");
+            if(count($this->cc) > 0)
+                $result .= $this->AddrAppend("Cc", $this->cc);
         }
 
         $from = array();
@@ -797,9 +784,6 @@ class PHPMailer
         $from[0][1] = $this->FromName;
         $result .= $this->AddrAppend("From", $from); 
 
-        if(count($this->cc) > 0)
-            $result .= $this->AddrAppend("Cc", $this->cc);
-
         // sendmail and mail() extract Bcc from the header before sending
         if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))
             $result .= $this->AddrAppend("Bcc", $this->bcc);
@@ -815,10 +799,6 @@ class PHPMailer
         $result .= $this->HeaderLine("X-Priority", $this->Priority);
         $result .= $this->HeaderLine("X-Mailer", "PHPMailer [version " . $this->Version . "]");
         
-        if ($this->Precedence != "") {
-            $result .= $this->HeaderLine("Precedence", $this->Precedence);
-        }
-
         if($this->ConfirmReadingTo != "")
         {
             $result .= $this->HeaderLine("Disposition-Notification-To", 
@@ -843,7 +823,7 @@ class PHPMailer
             case "attachments":
                 // fall through
             case "alt_attachments":
-                if($this->EmbeddedImageCount() > 0)
+                if($this->InlineImageExists())
                 {
                     $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 
                                     "multipart/related", $this->LE, $this->LE, 
@@ -945,8 +925,9 @@ class PHPMailer
         if($encoding == "") { $encoding = $this->Encoding; }
 
         $result .= $this->TextLine("--" . $boundary);
-        $result .= sprintf("Content-Type: %s; charset = \"%s\"\n", 
+        $result .= sprintf("Content-Type: %s; charset = \"%s\"", 
                             $contentType, $charSet);
+        $result .= $this->LE;
         $result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding);
         $result .= $this->LE;
        
@@ -1009,7 +990,7 @@ class PHPMailer
      * @param string $path Path to the attachment.
      * @param string $name Overrides the attachment name.
      * @param string $encoding File encoding (see $Encoding).
-     * @param string $type File extension type.
+     * @param string $type File extension (MIME) type.
      * @return bool
      */
     function AddAttachment($path, $name = "", $encoding = "base64", 
@@ -1024,7 +1005,6 @@ class PHPMailer
         if($name == "")
             $name = $filename;
 
-        // Append to $attachment array
         $cur = count($this->attachment);
         $this->attachment[$cur][0] = $path;
         $this->attachment[$cur][1] = $filename;
@@ -1127,22 +1107,18 @@ class PHPMailer
               // chunk_split is found in PHP >= 3.0.6
               $encoded = chunk_split(base64_encode($str), 76, $this->LE);
               break;
-
           case "7bit":
           case "8bit":
               $encoded = $this->FixEOL($str);
               if (substr($encoded, -(strlen($this->LE))) != $this->LE)
                 $encoded .= $this->LE;
               break;
-
           case "binary":
               $encoded = $str;
               break;
-
           case "quoted-printable":
               $encoded = $this->EncodeQP($str);
               break;
-
           default:
               $this->SetError($this->Lang("encoding") . $encoding);
               break;
@@ -1262,7 +1238,7 @@ class PHPMailer
      * @param string $string String attachment data.
      * @param string $filename Name of the attachment.
      * @param string $encoding File encoding (see $Encoding).
-     * @param string $type File extension type.
+     * @param string $type File extension (MIME) type.
      * @return void
      */
     function AddStringAttachment($string, $filename, $encoding = "base64", 
@@ -1281,13 +1257,15 @@ class PHPMailer
     
     /**
      * Adds an embedded attachment.  This can include images, sounds, and 
-     * just about any other document.
+     * just about any other document.  Make sure to set the $type to an 
+     * image type.  For JPEG images use "image/jpeg" and for GIF images 
+     * use "image/gif".
      * @param string $path Path to the attachment.
      * @param string $cid Content ID of the attachment.  Use this to identify 
      *        the Id for accessing the image in an HTML form.
      * @param string $name Overrides the attachment name.
      * @param string $encoding File encoding (see $Encoding).
-     * @param string $type File extension type.
+     * @param string $type File extension (MIME) type.  
      * @return bool
      */
     function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", 
@@ -1318,16 +1296,19 @@ class PHPMailer
     }
     
     /**
-     * Returns the number of embedded images in an email.
+     * Returns true if an inline attachment is present.
      * @access private
-     * @return int
+     * @return bool
      */
-    function EmbeddedImageCount() {
-        $result = 0;
+    function InlineImageExists() {
+        $result = false;
         for($i = 0; $i < count($this->attachment); $i++)
         {
             if($this->attachment[$i][6] == "inline")
-                $result++;
+            {
+                $result = true;
+                break;
+            }
         }
         
         return $result;
@@ -1414,7 +1395,7 @@ class PHPMailer
     }
 
     /**
-     * Returns the proper RFC 822 formatted date. Returns string.
+     * Returns the proper RFC 822 formatted date. 
      * @access private
      * @return string
      */
@@ -1427,36 +1408,6 @@ class PHPMailer
 
         return $result;
     }
-
-    /**
-     * Returns Received header for message tracing. Returns string.
-     * @access private
-     * @return string
-     */
-    function Received() {
-        if ($this->ServerVar('SERVER_NAME') != '')
-        {
-            $protocol = ($this->ServerVar('HTTPS') == 'on') ? 'HTTPS' : 'HTTP';
-            $remote = $this->ServerVar('REMOTE_HOST');
-            if($remote == "")
-                $remote = 'phpmailer';
-            $remote .= ' (['.$this->ServerVar('REMOTE_ADDR').'])';
-        }
-        else
-        {
-            $protocol = 'local';
-            $remote = $this->ServerVar('USER');
-            if($remote == '')
-                $remote = 'phpmailer';
-        }
-
-        $result = sprintf("Received: from %s %s\tby %s " .
-                          "with %s (PHPMailer);%s\t%s%s", $remote, $this->LE,
-                          $this->ServerHostname(), $protocol, $this->LE,
-                          $this->RFCDate(), $this->LE);
-
-        return $result;
-    }
     
     /**
      * Returns the appropriate server variable.  Should work with both 
@@ -1510,7 +1461,7 @@ class PHPMailer
         if(isset($this->language[$key]))
             return $this->language[$key];
         else
-            return "";
+            return "Language string failed to load: " . $key;
     }
     
     /**
@@ -1522,7 +1473,7 @@ class PHPMailer
     }
 
     /**
-     * Changes every end of line from CR or LF to CRLF.  Returns string.
+     * Changes every end of line from CR or LF to CRLF.  
      * @access private
      * @return string
      */
@@ -1534,7 +1485,7 @@ class PHPMailer
     }
 
     /**
-     * Adds a custom header.  Returns void.
+     * Adds a custom header. 
      * @return void
      */
     function AddCustomHeader($custom_header) {
diff --git a/lib/phpmailer/language/phpmailer.lang-cz.php b/lib/phpmailer/language/phpmailer.lang-cz.php
new file mode 100755 (executable)
index 0000000..f272f92
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * PHPMailer language file.  
+ * Czech Version
+ */
+
+$PHPMAILER_LANG = array();
+
+$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í: ';
+?>
\ No newline at end of file
diff --git a/lib/phpmailer/language/phpmailer.lang-de.php b/lib/phpmailer/language/phpmailer.lang-de.php
new file mode 100755 (executable)
index 0000000..a7d34af
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/**
+ * PHPMailer language file.  
+ * German Version
+ */
+
+$PHPMAILER_LANG = array();
+
+$PHPMAILER_LANG["provide_address"] = 'Bitte geben Sie mindestens eine ' .
+                                     'Empf&auml;nger Emailadresse an.';
+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer wird nicht unterst&uuml;tzt.';
+$PHPMAILER_LANG["execute"] = 'Konnte folgenden Befehl nicht ausf&uuml;hren: ';
+$PHPMAILER_LANG["instantiate"] = 'Mail Funktion konnte nicht initialisiert werden.';
+$PHPMAILER_LANG["authenticate"] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
+$PHPMAILER_LANG["from_failed"] = 'Die folgende Absenderadresse ist nicht korrekt: ';
+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Fehler: Die folgenden ' .
+                                       'Empf&auml;nger sind nicht korrekt: ';
+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Fehler: Daten werden nicht akzeptiert.';
+$PHPMAILER_LANG["connect_host"] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
+$PHPMAILER_LANG["file_access"] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
+$PHPMAILER_LANG["file_open"] = 'Datei Fehler: Konnte Date nicht &ouml;ffnen: ';
+$PHPMAILER_LANG["encoding"] = 'Unbekanntes Encoding-Format: ';
+?>
\ No newline at end of file
index c5a6da82c767d018e96a453f920fb116ac0d97c9..2f45383feca98ae91864c65fb945cfa24667aa47 100644 (file)
@@ -21,4 +21,3 @@ $PHPMAILER_LANG["file_access"] = 'Could not access file: ';
 $PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
 $PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
 ?>
-
diff --git a/lib/phpmailer/language/phpmailer.lang-es.php b/lib/phpmailer/language/phpmailer.lang-es.php
new file mode 100755 (executable)
index 0000000..9e77137
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/**
+ * PHPMailer language file.  
+ * Versión en español
+ */
+
+$PHPMAILER_LANG = array();
+
+$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: ';
+?>
\ No newline at end of file
diff --git a/lib/phpmailer/language/phpmailer.lang-fr.php b/lib/phpmailer/language/phpmailer.lang-fr.php
new file mode 100755 (executable)
index 0000000..2c2f81b
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * PHPMailer language file.  
+ * French Version
+ * bruno@ioda-net.ch 09.08.2003
+ */
+
+$PHPMAILER_LANG = array();
+
+$PHPMAILER_LANG["provide_address"] = 'Vous devez fournir au moins ' .
+                                     'une adresse de destinataire.';
+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer non supporté.';
+$PHPMAILER_LANG["execute"] = 'Ne peut pas lancer l\'exécution: ';
+$PHPMAILER_LANG["instantiate"] = 'Impossible d\'instancier la fonction mail.';
+$PHPMAILER_LANG["authenticate"] = 'SMTP Erreur: Echec de l\'authentification.';
+$PHPMAILER_LANG["from_failed"] = 'L\'adresse From suivante a échoué : ';
+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Erreur: Les destinataires ' .
+                                       'suivants sont en erreur : ';
+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Erreur: Data non acceptée.';
+$PHPMAILER_LANG["connect_host"] = 'SMTP Erreur: Impossible de connecter le serveur SMTP .';
+$PHPMAILER_LANG["file_access"] = 'N\'arrive pas à accéder au fichier: ';
+$PHPMAILER_LANG["file_open"] = 'Erreur Fichier: ouverture impossible: ';
+$PHPMAILER_LANG["encoding"] = 'Encodage inconnu: ';
+?>
diff --git a/lib/phpmailer/language/phpmailer.lang-it.php b/lib/phpmailer/language/phpmailer.lang-it.php
new file mode 100755 (executable)
index 0000000..26ef64d
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+* PHPMailer language file.
+* Italian version
+* @package PHPMailer
+* @author Ilias Bartolini <brain79@inwind.it>
+*/
+
+$PHPMAILER_LANG = array();
+
+$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: ';
+?>
diff --git a/lib/phpmailer/language/phpmailer.lang-nl.php b/lib/phpmailer/language/phpmailer.lang-nl.php
new file mode 100755 (executable)
index 0000000..9cd3a7a
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/**
+ * PHPMailer language file.
+ * Dutch Version
+ */
+
+$PHPMAILER_LANG = array();
+
+$PHPMAILER_LANG["provide_address"] = 'U moet op zijn minst één ontvanger ' .
+                                     'opgeven';
+$PHPMAILER_LANG["mailer_not_supported"] = ' e-mail service wordt niet ondersteund.';
+$PHPMAILER_LANG["execute"] = 'Kan niet worden uitgevoerd: ';
+$PHPMAILER_LANG["instantiate"] = 'Kan mail functie niet op gang brengen.';
+$PHPMAILER_LANG["authenticate"] = 'SMTP fout: Ongeldige gebruikersnaam of wachtwoord.';
+$PHPMAILER_LANG["from_failed"] = 'De volgende afzenders zijn ongeldig: ';
+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Fout: Kon email niet verzend ' .
+                                       'naar de volgende ontvangers : ';
+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Fout: Data niet geaccepteerd.';
+$PHPMAILER_LANG["connect_host"] = 'SMTP Fout: Kan geen verbinding maken met de SMTP server.';
+$PHPMAILER_LANG["file_access"] = 'Bijlage kon niet worden geopend: ';
+$PHPMAILER_LANG["file_open"] = 'Bijlage kon niet worden geopend: ';
+$PHPMAILER_LANG["encoding"] = 'Onbekende codering: ';
+?>
\ No newline at end of file
diff --git a/lib/phpmailer/language/phpmailer.lang-no.php b/lib/phpmailer/language/phpmailer.lang-no.php
new file mode 100755 (executable)
index 0000000..cc42131
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Norwegian language file.
+ * English Version
+ */
+
+$PHPMAILER_LANG = array();
+
+$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: ';
+?>
\ No newline at end of file
diff --git a/lib/phpmailer/language/phpmailer.lang-se.php b/lib/phpmailer/language/phpmailer.lang-se.php
new file mode 100755 (executable)
index 0000000..349c2ce
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * PHPMailer language file.  
+ * Swedish Version
+ * Author: Johan Linnér <johan@linner.biz>
+ */
+
+$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
diff --git a/lib/phpmailer/language/phpmailer.lang-tr.php b/lib/phpmailer/language/phpmailer.lang-tr.php
new file mode 100755 (executable)
index 0000000..2acec15
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * PHPMailer dil dosyasý.
+ * Türkçe Versiyonu
+ */ÝZYAZILIM - Elçin Özel - Can Yýlmaz - Mehmet Benlioðlu
+
+$PHPMAILER_LANG = array();
+
+$PHPMAILER_LANG["provide_address"] = 'En az bir tane mail adresi belirtmek zorundasýnýz ' .
+                                     'alýcýnýn email adresi.';
+$PHPMAILER_LANG["mailer_not_supported"] = ' mailler desteklenmemektedir.';
+$PHPMAILER_LANG["execute"] = 'Çalýþtýrýlamýyor: ';
+$PHPMAILER_LANG["instantiate"] = 'Örnek mail fonksiyonu yaratýlamadý.';
+$PHPMAILER_LANG["authenticate"] = 'SMTP Hatasý: Doðrulanamýyor.';
+$PHPMAILER_LANG["from_failed"] = 'Baþarýsýz olan gönderici adresi: ';
+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Hatasý:  ' .
+                                       'alýcýlara ulaþmadý: ';
+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Hatasý: Veri kabul edilmedi.';
+$PHPMAILER_LANG["connect_host"] = 'SMTP Hatasý: SMTP hosta baðlanýlamýyor.';
+$PHPMAILER_LANG["file_access"] = 'Dosyaya eriþilemiyor: ';
+$PHPMAILER_LANG["file_open"] = 'Dosya Hatasý: Dosya açýlamýyor: ';
+$PHPMAILER_LANG["encoding"] = 'Bilinmeyen þifreleme: ';
+
+?>
\ No newline at end of file