PHPMailer\PHPMailer\PHPMailer::DKIM_QP PHP Method

DKIM_QP() public method

Quoted-Printable-encode a DKIM header.
public DKIM_QP ( string $txt ) : string
$txt string
return string
    public function DKIM_QP($txt)
    {
        $line = '';
        for ($i = 0; $i < strlen($txt); $i++) {
            $ord = ord($txt[$i]);
            if (0x21 <= $ord and $ord <= 0x3a or $ord == 0x3c or 0x3e <= $ord and $ord <= 0x7e) {
                $line .= $txt[$i];
            } else {
                $line .= '=' . sprintf('%02X', $ord);
            }
        }
        return $line;
    }