From f0b4e3543844b7a85f13e7d57886d04a9b3ba4a1 Mon Sep 17 00:00:00 2001 From: Yoshi Sakai Date: Sat, 12 Jan 2013 14:29:59 +0900 Subject: [PATCH 1/2] add error information from class.smtp.php add $this->smtp->getError() to the throw new phpmailerException --- class.phpmailer.php | 3 ++- language/phpmailer.lang-ja.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/class.phpmailer.php b/class.phpmailer.php index 01b70b48..d3222b00 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -965,7 +965,8 @@ class PHPMailer { } $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; if(!$this->smtp->Mail($smtp_from)) { - throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL); + $this->SetError($this->Lang('from_failed') .$smtp_from . "
" .implode("
",$this->smtp->getError())) ; + throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); } // Attempt to send attach all recipients diff --git a/language/phpmailer.lang-ja.php b/language/phpmailer.lang-ja.php index 87472c99..ca6de909 100644 --- a/language/phpmailer.lang-ja.php +++ b/language/phpmailer.lang-ja.php @@ -3,6 +3,7 @@ * PHPMailer language file: refer to English translation for definitive list * Japanese Version * By Mitsuhiro Yoshida - http://mitstek.com/ +* Modified by Yoshi Sakai - http://bluemooninc.jp/ */ $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; @@ -13,7 +14,7 @@ $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; $PHPMAILER_LANG['execute'] = '実行できませんでした: '; $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; -$PHPMAILER_LANG['from_failed'] = '次のFromアドレスに間違いがあります: '; +$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; //$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: '; $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; From 198cf882379f3c81ea687ca2de74ab342f61bc77 Mon Sep 17 00:00:00 2001 From: Yoshi Sakai Date: Sat, 12 Jan 2013 20:53:36 +0900 Subject: [PATCH 2/2] Change html tag
to ":" and "," --- class.phpmailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class.phpmailer.php b/class.phpmailer.php index d3222b00..d8811fba 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -965,7 +965,7 @@ class PHPMailer { } $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; if(!$this->smtp->Mail($smtp_from)) { - $this->SetError($this->Lang('from_failed') .$smtp_from . "
" .implode("
",$this->smtp->getError())) ; + $this->SetError($this->Lang('from_failed') .$smtp_from . " : " .implode(",",$this->smtp->getError())) ; throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); }