public function PhpMailerSmtp::__destruct in PHPMailer SMTP 2.1.x
Same name and namespace in other branches
- 8 src/Plugin/Mail/PhpMailerSmtp.php \Drupal\phpmailer_smtp\Plugin\Mail\PhpMailerSmtp::__destruct()
- 2.x src/Plugin/Mail/PhpMailerSmtp.php \Drupal\phpmailer_smtp\Plugin\Mail\PhpMailerSmtp::__destruct()
- 2.0.x src/Plugin/Mail/PhpMailerSmtp.php \Drupal\phpmailer_smtp\Plugin\Mail\PhpMailerSmtp::__destruct()
Overrides PHPMailer::__destruct().
File
- src/
Plugin/ Mail/ PhpMailerSmtp.php, line 273
Class
- PhpMailerSmtp
- Implements the base PHPMailer SMTP class for the Drupal MailInterface.
Namespace
Drupal\phpmailer_smtp\Plugin\MailCode
public function __destruct() {
// Disable debug output if SMTP keep-alive is enabled.
// PHP is most likely shutting down altogether (this class is instantiated
// as a static singleton). Since logging facilities (e.g., database
// connection) quite potentially have been shut down already, simply turn
// off SMTP debugging. Without this override, debug output would be printed
// on the screen and CLI output.
if ($this->SMTPKeepAlive && isset($this->smtp->do_debug)) {
$this->smtp->do_debug = 0;
}
parent::__destruct();
}