Commit 5f5459d0 authored by smk-ka's avatar smk-ka

#764448 by smk-ka: Fixed sending more than one message for certain server configurations.

parent 4c2460be
......@@ -32,6 +32,10 @@ by smk-ka: Provide more user-friendly error messages.
#686994 by sun, smk-ka: Restored compatibility with PHPMailer 2.x library.
#675388 by smk-ka: Fixed unrecognized character in regular expression for PHP
versions < 5.2.2.
#607204 by dagmar, smk-ka: Fixed unable to reply to e-mails sent via Google
Mail. Added an option to always set a "Reply-To" address.
#764448 by smk-ka: Fixed sending more than one message for certain server
configurations.
PHPMailer 6.x-2.1, 2009-06-10
......
......@@ -59,8 +59,13 @@ class DrupalPHPMailer extends PHPMailer {
try {
$result = parent::SmtpSend($header, $body);
// Close connection when not using SMTP keep-alive.
if (!$this->SMTPKeepAlive) {
$this->SmtpClose();
}
}
catch (phpmailerException $e) {}
catch (phpmailerException $exception) {}
if ($this->SMTPDebug) {
if ($debug = ob_get_contents()) {
......@@ -72,9 +77,9 @@ class DrupalPHPMailer extends PHPMailer {
// Reinitialize properties.
$this->Reset();
if (isset($e)) {
if (isset($exception)) {
// Pass exception to caller.
throw $e;
throw $exception;
}
return $result;
}
......@@ -109,8 +114,10 @@ class DrupalPHPMailer extends PHPMailer {
* Destructor.
*/
public function __destruct() {
// Required when using SMTP keep-alive.
$this->SmtpClose();
// Be nice and close the connection when using SMTP keep-alive.
if ($this->SMTPKeepAlive) {
$this->SmtpClose();
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment