You are here

public function PHPMailer::SmtpClose in SMTP Authentication Support 7.2

Same name and namespace in other branches
  1. 5 smtp.module \PHPMailer::SmtpClose()
  2. 7 smtp.phpmailer.inc \PHPMailer::SmtpClose()

Closes the active SMTP session if one exists.

Return value

void

1 call to PHPMailer::SmtpClose()
PHPMailer::SmtpConnect in ./smtp.phpmailer.inc
Initiates a connection to an SMTP server. Returns FALSE if the operation failed. @uses SMTP @access public

File

./smtp.phpmailer.inc, line 820
The mail handler class in smtp module, based on code of the phpmailer library, customized and relicensed to GPLv2.

Class

PHPMailer
PHPMailer - PHP email transport class NOTE: Requires PHP version 5 or later @package PHPMailer @author Andy Prevost @author Marcus Bointon @copyright 2004 - 2009 Andy Prevost

Code

public function SmtpClose() {
  if (!is_null($this->smtp)) {
    if ($this->smtp
      ->Connected()) {
      $this->smtp
        ->Quit();
      $this->smtp
        ->Close();
    }
  }
}