public function PHPMailer::setWordWrap
Search API
5.x PHPMailer.php | public PHPMailer::setWordWrap() |
Apply word wrapping to the message body. Wraps the message body to the number of chars set in the WordWrap property. You should only do this to plain-text bodies as wrapping HTML tags may break them. This is called automatically by createBody(), so you don't need to call it yourself.
1 call to PHPMailer::setWordWrap()
- PHPMailer::createBody in inc/
PHPMailer/ src/ PHPMailer.php - Assemble the message body. Returns an empty string on failure.
File
- inc/
PHPMailer/ src/ PHPMailer.php, line 2300
Class
- PHPMailer
- PHPMailer - PHP email creation and transport class.
Namespace
PHPMailer\PHPMailerCode
public function setWordWrap()
{
if ($this->WordWrap < 1) {
return;
}
switch ($this->message_type) {
case 'alt':
case 'alt_inline':
case 'alt_attach':
case 'alt_inline_attach':
$this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap);
break;
default:
$this->Body = $this->wrapText($this->Body, $this->WordWrap);
break;
}
}