PHPMailer\PHPMailer

PHPMailer::secureHeader()publicWP 1.0

Strip newlines to prevent header injection.

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

No Hooks.

Return

String.

Usage

$PHPMailer = new PHPMailer();
$PHPMailer->secureHeader( $str );
$str(string) (required)
-

Code of PHPMailer::secureHeader() WP 6.0

public function secureHeader($str)
{
    return trim(str_replace(["\r", "\n"], '', $str));
}