PHPMailer\PHPMailer

PHPMailer::hasLineLongerThanMax()public staticWP 1.0

Detect if a string contains a line longer than the maximum line length allowed by RFC 2822 section 2.1.1.

Method of the class: PHPMailer{}

No Hooks.

Return

true|false.

Usage

$result = PHPMailer::hasLineLongerThanMax( $str );
$str(string) (required)
-

PHPMailer::hasLineLongerThanMax() code WP 6.4.3

public static function hasLineLongerThanMax($str)
{
    return (bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + strlen(static::$LE)) . ',})/m', $str);
}