PHPMailer\PHPMailer\PHPMailer::DKIM_BodyC PHP Method

DKIM_BodyC() public method

Uses the 'simple' algorithm from RFC6376 section 3.4.3
public DKIM_BodyC ( string $body ) : string
$body string Message Body
return string
    public function DKIM_BodyC($body)
    {
        if (empty($body)) {
            return "\r\n";
        }
        // Normalize line endings
        $body = str_replace("\r\n", "\n", $body);
        $body = str_replace("\n", "\r\n", $body);
        //Reduce multiple trailing line breaks to a single one
        return rtrim($body, "\r\n") . "\r\n";
    }