You are here

public function DrupalPHPMailer::Reset in PHPMailer 7.3

Same name and namespace in other branches
  1. 5.2 includes/phpmailer.class.inc \DrupalPHPMailer::Reset()
  2. 6.3 includes/phpmailer.class.inc \DrupalPHPMailer::Reset()
  3. 6 includes/phpmailer.inc \DrupalPHPMailer::Reset()
  4. 6.2 includes/phpmailer.class.inc \DrupalPHPMailer::Reset()
  5. 7.4 includes/phpmailer.class.inc \DrupalPHPMailer::Reset()

Initialize or re-initialize properties after sending mail.

2 calls to DrupalPHPMailer::Reset()
DrupalPHPMailer::SmtpSend in includes/phpmailer.class.inc
Send mail via SMTP.
DrupalPHPMailer::__construct in includes/phpmailer.class.inc
Constructor.

File

includes/phpmailer.class.inc, line 144
Implements the base PHPMailer for Drupal class.

Class

DrupalPHPMailer
Class for implementing the PHPMailer library in Drupal.

Code

public function Reset() {
  $this
    ->ClearAllRecipients();
  $this
    ->ClearReplyTos();
  $this
    ->ClearAttachments();
  $this
    ->ClearCustomHeaders();
  $this->Priority = 3;
  $this->CharSet = variable_get('smtp_charset', 'utf-8');
  $this->ContentType = 'text/plain';
  $this->Encoding = '8bit';

  // Set default From name.
  $from_name = variable_get('smtp_fromname', '');
  if ($from_name == '') {

    // Fall back on the site name.
    $from_name = variable_get('site_name', 'Drupal');
  }
  $this->FromName = $from_name;
  $this->Sender = '';
  $this->MessageID = '';
  $this->ReturnPath = '';
}