PHPMailer\PHPMailer

PHPMailer::validateEncoding()protectedWP 1.0

Validate encodings.

{} It's a method of the class: PHPMailer{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->validateEncoding( $encoding );
$encoding(string) (required)
-

Code of PHPMailer::validateEncoding() WP 6.0

protected function validateEncoding($encoding)
{
    return in_array(
        $encoding,
        [
            self::ENCODING_7BIT,
            self::ENCODING_QUOTED_PRINTABLE,
            self::ENCODING_BASE64,
            self::ENCODING_8BIT,
            self::ENCODING_BINARY,
        ],
        true
    );
}