PHPMailer\PHPMailer
PHPMailer::setMessageType
Set the message type. PHPMailer only supports some preset message types, not arbitrary MIME structures.
Method of the class: PHPMailer{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->setMessageType();
PHPMailer::setMessageType() PHPMailer::setMessageType code WP 7.0
protected function setMessageType()
{
$type = [];
if ($this->alternativeExists()) {
$type[] = 'alt';
}
if ($this->inlineImageExists()) {
$type[] = 'inline';
}
if ($this->attachmentExists()) {
$type[] = 'attach';
}
$this->message_type = implode('_', $type);
if ('' === $this->message_type) {
//The 'plain' message_type refers to the message having a single body element, not that it is plain-text
$this->message_type = 'plain';
}
}