Skip to content

Commit

Permalink
0003877: [email] Upgrade to PHPMailer 1.72 (vboctor)
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2749 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Jul 24, 2004
1 parent 7cef626 commit 692c712
Show file tree
Hide file tree
Showing 17 changed files with 219 additions and 79 deletions.
8 changes: 8 additions & 0 deletions 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
Expand Down
8 changes: 4 additions & 4 deletions core/phpmailer/README
Expand Up @@ -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!

Expand All @@ -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";
Expand Down
70 changes: 18 additions & 52 deletions core/phpmailer/class.phpmailer.php
Expand Up @@ -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.
Expand All @@ -141,7 +141,6 @@ class PHPMailer
*/
var $Hostname = "";


/////////////////////////////////////////////////
// SMTP VARIABLES
/////////////////////////////////////////////////
Expand Down Expand Up @@ -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)
{
Expand All @@ -355,35 +355,32 @@ function Send() {
if(!empty($this->AltBody))
$this->ContentType = "multipart/alternative";

$this->error_count = 0; // reset errors
$this->SetMessageType();
$header .= $this->CreateHeader();
$body = $this->CreateBody();

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;
}

/**
Expand Down Expand Up @@ -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'))
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions core/phpmailer/language/phpmailer.lang-cz.php
@@ -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í: ';
?>
4 changes: 2 additions & 2 deletions core/phpmailer/language/phpmailer.lang-de.php
Expand Up @@ -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&auml;nger sind nicht korrekt: ';
'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: ';
?>
?>
23 changes: 23 additions & 0 deletions core/phpmailer/language/phpmailer.lang-es.php
@@ -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: ';
?>
24 changes: 24 additions & 0 deletions core/phpmailer/language/phpmailer.lang-fr.php
@@ -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: ';
?>
23 changes: 23 additions & 0 deletions core/phpmailer/language/phpmailer.lang-nl.php
@@ -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: ';
?>
23 changes: 23 additions & 0 deletions core/phpmailer/language/phpmailer.lang-no.php
@@ -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: ';
?>
24 changes: 24 additions & 0 deletions core/phpmailer/language/phpmailer.lang-se.php
@@ -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: ';
?>
24 changes: 24 additions & 0 deletions core/phpmailer/language/phpmailer.lang-tr.php
@@ -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: ';

?>
3 changes: 2 additions & 1 deletion doc/ChangeLog
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lang/strings_czech.txt
Expand Up @@ -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 $
###########################################################################
?>
<?php
Expand Down Expand Up @@ -975,7 +975,7 @@ $s_attachments = "dodatky";
$s_attachment_alt = "D";

# PHPMailer
$s_phpmailer_language = 'cs';
$s_phpmailer_language = 'cz';

# Sponsorship Strings
$s_sponsors = '%d sponzor(-�i)';
Expand Down

0 comments on commit 692c712

Please sign in to comment.