You are here

function DrupalPHPMailer::Reset in PHPMailer 6

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.2 includes/phpmailer.class.inc \DrupalPHPMailer::Reset()
  4. 7.4 includes/phpmailer.class.inc \DrupalPHPMailer::Reset()
  5. 7.3 includes/phpmailer.class.inc \DrupalPHPMailer::Reset()

(Re-)initialize properties after sending mail.

1 call to DrupalPHPMailer::Reset()
DrupalPHPMailer::DrupalPHPMailer in includes/phpmailer.inc
Constructor.

File

includes/phpmailer.inc, line 45

Class

DrupalPHPMailer

Code

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

  // 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 = '';
}