PHPMailer::msgHTML

Advertisement

Summery Summery

Create a message body from an HTML string.

Syntax Syntax

PHPMailer::msgHTML( string $message, string $basedir = '', boolean|callable $advanced = false )

Description Description

Automatically inlines images and creates a plain-text version by converting the HTML, overwriting any existing values in Body and AltBody. Do not source $message content from user input! $basedir is prepended when handling relative URLs, e.g. PHPMailer::msgHTML 1 and must not be empty will look for an image file in $basedir/images/a.png and convert it to inline. If you don’t provide a $basedir, relative paths will be left untouched (and thus probably break in email) If you don’t want to apply these transformations to your HTML, just set Body and AltBody directly.

Parameters Parameters

$message

(Required) HTML message string

$basedir

(Optional) Absolute path to a base directory to prepend to relative paths to images

Default value: ''

$advanced

(Optional) Whether to use the internal HTML to text converter or your own custom converter @see PHPMailer::html2text()

Default value: false

Return Return

(string) $message The transformed message Body

Source Source

File: wp-includes/class-phpmailer.php


			

Advertisement

Advertisement

Leave a Reply