PHPMailer\PHPMailer

PHPMailer::setWordWrap()publicWP 1.0

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.

Метод класса: PHPMailer{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$PHPMailer = new PHPMailer();
$PHPMailer->setWordWrap();

Код PHPMailer::setWordWrap() WP 6.5.2

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;
    }
}