$mail->setText('Hello, this is a simple text email message.');
$mail->setText('Hello
This is an HTML email message.
');
$mail->setText(file_get_contents('email-template.html'));The php Mail setText() function is a part of the PHPMailer package library.