protected function PHPMailer::setError
Search API
5.x PHPMailer.php | protected PHPMailer::setError($msg) |
Add an error message to the error container.
Parameters
string $msg:
14 calls to PHPMailer::setError()
- PHPMailer::addAnAddress in inc/
PHPMailer/ src/ PHPMailer.php - Add an address to one of the recipient arrays or to the ReplyTo array. Addresses that have been added already return false, but do not throw exceptions.
- PHPMailer::addAttachment in inc/
PHPMailer/ src/ PHPMailer.php - Add an attachment from a path on the filesystem. Never use a user-supplied path to a file! Returns false if the file could not be found or read. Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client. If you need to do that, fetch…
- PHPMailer::addEmbeddedImage in inc/
PHPMailer/ src/ PHPMailer.php - Add an embedded (inline) attachment from a file. This can include images, sounds, and just about any other document type. These differ from 'regular' attachments in that they are intended to be displayed inline with the message, not just…
- PHPMailer::addOrEnqueueAnAddress in inc/
PHPMailer/ src/ PHPMailer.php - Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still be modified after calling this function), addition of such…
- PHPMailer::addStringAttachment in inc/
PHPMailer/ src/ PHPMailer.php - Add a string or binary attachment (non-filesystem). This method can be used to attach ascii or binary data, such as a BLOB record from a database.
File
- inc/
PHPMailer/ src/ PHPMailer.php, line 3685
Class
- PHPMailer
- PHPMailer - PHP email creation and transport class.
Namespace
PHPMailer\PHPMailerCode
protected function setError($msg)
{
++$this->error_count;
if ('smtp' == $this->Mailer and null !== $this->smtp) {
$lasterror = $this->smtp->getError();
if (!empty($lasterror ['error'])) {
$msg .= $this->lang('smtp_error') . $lasterror ['error'];
if (!empty($lasterror ['detail'])) {
$msg .= ' Detail: ' . $lasterror ['detail'];
}
if (!empty($lasterror ['smtp_code'])) {
$msg .= ' SMTP code: ' . $lasterror ['smtp_code'];
}
if (!empty($lasterror ['smtp_code_ex'])) {
$msg .= ' Additional SMTP info: ' . $lasterror ['smtp_code_ex'];
}
}
}
$this->ErrorInfo = $msg;
}