private function PHPMailer::SetMessageType in SMTP Authentication Support 7.2
Same name and namespace in other branches
- 5 smtp.module \PHPMailer::SetMessageType()
- 7 smtp.phpmailer.inc \PHPMailer::SetMessageType()
Sets the message type. @access private
Return value
void
1 call to PHPMailer::SetMessageType()
- PHPMailer::Send in ./
smtp.phpmailer.inc - Creates message and assigns Mailer. If the message is not sent successfully then it returns FALSE. Use the ErrorInfo variable to view description of the error.
File
- ./
smtp.phpmailer.inc, line 1260 - 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
private function SetMessageType() {
if (count($this->attachment) < 1 && strlen($this->AltBody) < 1) {
$this->message_type = 'plain';
}
else {
if (count($this->attachment) > 0) {
$this->message_type = 'attachments';
}
if (strlen($this->AltBody) > 0 && count($this->attachment) < 1) {
$this->message_type = 'alt';
}
if (strlen($this->AltBody) > 0 && count($this->attachment) > 0) {
$this->message_type = 'alt_attachments';
}
}
}