From 692c712a589a2ad5e282f03e3c53ae2506535423 Mon Sep 17 00:00:00 2001 From: Victor Boctor Date: Sat, 24 Jul 2004 13:36:07 +0000 Subject: [PATCH] 0003877: [email] Upgrade to PHPMailer 1.72 (vboctor) git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2749 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- core/phpmailer/ChangeLog.txt | 8 +++ core/phpmailer/README | 8 +-- core/phpmailer/class.phpmailer.php | 70 +++++-------------- core/phpmailer/language/phpmailer.lang-cz.php | 24 +++++++ core/phpmailer/language/phpmailer.lang-de.php | 4 +- core/phpmailer/language/phpmailer.lang-es.php | 23 ++++++ core/phpmailer/language/phpmailer.lang-fr.php | 24 +++++++ core/phpmailer/language/phpmailer.lang-nl.php | 23 ++++++ core/phpmailer/language/phpmailer.lang-no.php | 23 ++++++ core/phpmailer/language/phpmailer.lang-se.php | 24 +++++++ core/phpmailer/language/phpmailer.lang-tr.php | 24 +++++++ doc/ChangeLog | 3 +- lang/strings_czech.txt | 8 +-- lang/strings_dutch.txt | 8 +-- lang/strings_norwegian.txt | 8 +-- lang/strings_swedish.txt | 8 +-- lang/strings_turkish.txt | 8 +-- 17 files changed, 219 insertions(+), 79 deletions(-) create mode 100644 core/phpmailer/language/phpmailer.lang-cz.php create mode 100644 core/phpmailer/language/phpmailer.lang-es.php create mode 100644 core/phpmailer/language/phpmailer.lang-fr.php create mode 100644 core/phpmailer/language/phpmailer.lang-nl.php create mode 100644 core/phpmailer/language/phpmailer.lang-no.php create mode 100644 core/phpmailer/language/phpmailer.lang-se.php create mode 100644 core/phpmailer/language/phpmailer.lang-tr.php diff --git a/core/phpmailer/ChangeLog.txt b/core/phpmailer/ChangeLog.txt index afbebf5876..254971167b 100644 --- a/core/phpmailer/ChangeLog.txt +++ b/core/phpmailer/ChangeLog.txt @@ -1,5 +1,13 @@ 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 diff --git a/core/phpmailer/README b/core/phpmailer/README index f451b89eef..de5876fc9a 100644 --- a/core/phpmailer/README +++ b/core/phpmailer/README @@ -50,7 +50,7 @@ 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"); +$mail->SetLanguage("br", "/optional/path/to/language/directory/"); That's it. You should now be ready to use PHPMailer! @@ -64,9 +64,9 @@ $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->SMTPAuth = true; // turn on SMTP authentication +$mail->Username = "jswan"; // SMTP username +$mail->Password = "secret"; // SMTP password $mail->From = "from@example.com"; $mail->FromName = "Mailer"; diff --git a/core/phpmailer/class.phpmailer.php b/core/phpmailer/class.phpmailer.php index 5ddad5b014..9c9200faa0 100644 --- a/core/phpmailer/class.phpmailer.php +++ b/core/phpmailer/class.phpmailer.php @@ -125,7 +125,7 @@ class PHPMailer * Holds PHPMailer version. * @var string */ - var $Version = "1.71"; + var $Version = "1.72"; /** * Sets the email address that a reading confirmation will be sent. @@ -141,7 +141,6 @@ class PHPMailer */ var $Hostname = ""; - ///////////////////////////////////////////////// // SMTP VARIABLES ///////////////////////////////////////////////// @@ -344,6 +343,7 @@ function AddReplyTo($address, $name = "") { function Send() { $header = ""; $body = ""; + $result = true; if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { @@ -355,6 +355,7 @@ function Send() { if(!empty($this->AltBody)) $this->ContentType = "multipart/alternative"; + $this->error_count = 0; // reset errors $this->SetMessageType(); $header .= $this->CreateHeader(); $body = $this->CreateBody(); @@ -362,28 +363,24 @@ function Send() { 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; } /** @@ -596,7 +593,7 @@ function SmtpClose() { * @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')) @@ -765,7 +762,6 @@ function CreateHeader() { $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)); @@ -1412,36 +1408,6 @@ function RFCDate() { return $result; } - - /** - * Returns Received header for message tracing. - * @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 diff --git a/core/phpmailer/language/phpmailer.lang-cz.php b/core/phpmailer/language/phpmailer.lang-cz.php new file mode 100644 index 0000000000..c6ef2aab79 --- /dev/null +++ b/core/phpmailer/language/phpmailer.lang-cz.php @@ -0,0 +1,24 @@ + diff --git a/core/phpmailer/language/phpmailer.lang-de.php b/core/phpmailer/language/phpmailer.lang-de.php index 89d249f970..3eabaedaa9 100644 --- a/core/phpmailer/language/phpmailer.lang-de.php +++ b/core/phpmailer/language/phpmailer.lang-de.php @@ -14,10 +14,10 @@ $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änger sind nicht korrekt: '; + 'Empfä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 öffnen: '; $PHPMAILER_LANG["encoding"] = 'Unbekanntes Encoding-Format: '; -?> \ No newline at end of file +?> diff --git a/core/phpmailer/language/phpmailer.lang-es.php b/core/phpmailer/language/phpmailer.lang-es.php new file mode 100644 index 0000000000..dac6578cae --- /dev/null +++ b/core/phpmailer/language/phpmailer.lang-es.php @@ -0,0 +1,23 @@ + diff --git a/core/phpmailer/language/phpmailer.lang-fr.php b/core/phpmailer/language/phpmailer.lang-fr.php new file mode 100644 index 0000000000..2c2f81bbb3 --- /dev/null +++ b/core/phpmailer/language/phpmailer.lang-fr.php @@ -0,0 +1,24 @@ + diff --git a/core/phpmailer/language/phpmailer.lang-nl.php b/core/phpmailer/language/phpmailer.lang-nl.php new file mode 100644 index 0000000000..f759a4d336 --- /dev/null +++ b/core/phpmailer/language/phpmailer.lang-nl.php @@ -0,0 +1,23 @@ + diff --git a/core/phpmailer/language/phpmailer.lang-no.php b/core/phpmailer/language/phpmailer.lang-no.php new file mode 100644 index 0000000000..e9a35e4f41 --- /dev/null +++ b/core/phpmailer/language/phpmailer.lang-no.php @@ -0,0 +1,23 @@ + diff --git a/core/phpmailer/language/phpmailer.lang-se.php b/core/phpmailer/language/phpmailer.lang-se.php new file mode 100644 index 0000000000..d8b1f40ccb --- /dev/null +++ b/core/phpmailer/language/phpmailer.lang-se.php @@ -0,0 +1,24 @@ + + */ + +$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: '; +?> diff --git a/core/phpmailer/language/phpmailer.lang-tr.php b/core/phpmailer/language/phpmailer.lang-tr.php new file mode 100644 index 0000000000..f0637003ab --- /dev/null +++ b/core/phpmailer/language/phpmailer.lang-tr.php @@ -0,0 +1,24 @@ + diff --git a/doc/ChangeLog b/doc/ChangeLog index 91a7940813..f68a76c9a6 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -15,7 +15,8 @@ Mantis ChangeLog - 0004154: [bugtracker] "Product version" and "Fixed in Version" do not get updated on rename (vboctor) - 0004160: [bugtracker] Javascript error in the issue view pages (vboctor) - 0004175: [bugtracker] Links are not hyperlinked properly if containing '[' or ']' (vboctor) -- 0003714: [Upgrade] Please add in a way to transfer attachments from the database to disk (thraxisp) +- 0003714: [upgrade] Please add in a way to transfer attachments from the database to disk (thraxisp) +- 0003877: [email] Upgrade to PHPMailer 1.72 (vboctor) - Updated German and Brazilian Portuguese language. 2004.07.20 - 0.19.0a2 diff --git a/lang/strings_czech.txt b/lang/strings_czech.txt index dfed8d17b3..ccb4cb61ab 100644 --- a/lang/strings_czech.txt +++ b/lang/strings_czech.txt @@ -14,11 +14,11 @@ # Czech: Jiri Kuchta, kuchta@feec.vutbr.cz # Code page: ISO-8859-2 # ------------------------------------------------- - # $Revision: 1.55 $ + # $Revision: 1.56 $ # $Author: vboctor $ - # $Date: 2004-07-18 15:22:04 $ + # $Date: 2004-07-24 13:36:06 $ # - # $Id: strings_czech.txt,v 1.55 2004-07-18 15:22:04 vboctor Exp $ + # $Id: strings_czech.txt,v 1.56 2004-07-24 13:36:06 vboctor Exp $ ########################################################################### ?> @@ -971,7 +971,7 @@ $s_attachments = "bijlage(n)"; $s_attachment_alt = "B"; # PHPMailer -$s_phpmailer_language = 'en'; +$s_phpmailer_language = 'nl'; # Sponsorship Strings $s_sponsors = '%d sponsor(s)'; diff --git a/lang/strings_norwegian.txt b/lang/strings_norwegian.txt index c62aa06c4c..c0232944a9 100644 --- a/lang/strings_norwegian.txt +++ b/lang/strings_norwegian.txt @@ -9,11 +9,11 @@ # Norwegian: Ingvald Skaug, dev@skaug.no # Norwegian: Alf-Ivar Holm, affi@csc.no # ------------------------------------------------- - # $Revision: 1.65 $ + # $Revision: 1.66 $ # $Author: vboctor $ - # $Date: 2004-07-18 15:22:04 $ + # $Date: 2004-07-24 13:36:07 $ # - # $Id: strings_norwegian.txt,v 1.65 2004-07-18 15:22:04 vboctor Exp $ + # $Id: strings_norwegian.txt,v 1.66 2004-07-24 13:36:07 vboctor Exp $ ########################################################################### ?>