function PHPMailer::SetMessageType in SMTP Authentication Support 5
Same name and namespace in other branches
- 7.2 smtp.phpmailer.inc \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.module - 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.module, line 1420 - Enables drupal to send email directly to an SMTP server using authentication. Uses the PHPMailer class by Brent R. Matzelle.
Class
- PHPMailer
- PHPMailer - PHP email transport class @package PHPMailer @author Brent R. Matzelle @copyright 2001 - 2003 Brent R. Matzelle
Code
function SetMessageType() {
if ($this->message_type == "pre") {
return;
}
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";
}
}
}