You are here

protected function PHPMailer::SetError in SMTP Authentication Support 7

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

Adds the error message to the error container. @access protected

Return value

void

8 calls to PHPMailer::SetError()
PHPMailer::AddAnAddress in ./smtp.phpmailer.inc
Adds an address to one of the recipient arrays Addresses that have been added already return FALSE, but do not throw exceptions
PHPMailer::AddAttachment in ./smtp.phpmailer.inc
Adds an attachment from a path on the filesystem. Returns FALSE if the file could not be found or accessed.
PHPMailer::AddEmbeddedImage in ./smtp.phpmailer.inc
Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
PHPMailer::EncodeFile in ./smtp.phpmailer.inc
Encodes attachment in requested format. Returns an empty string on failure.
PHPMailer::EncodeString in ./smtp.phpmailer.inc
Encodes string to requested format. Returns an empty string on failure.

... See full list

File

./smtp.phpmailer.inc, line 1927
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

protected function SetError($msg) {
  $this->error_count++;
  if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
    $lasterror = $this->smtp
      ->getError();
    if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) {
      $msg .= '<p>' . t('SMTP server error: !lasterror', array(
        '!lasterror' => $lasterror['smtp_msg'],
      )) . "</p>\n";
    }
  }
  $this->ErrorInfo = $msg;
}