PHPMailer\PHPMailer

PHPMailer::DKIM_QP()publicWP 1.0

Quoted-Printable-encode a DKIM header.

Method of the class: PHPMailer{}

No Hooks.

Return

String.

Usage

$PHPMailer = new PHPMailer();
$PHPMailer->DKIM_QP( $txt );
$txt(string) (required)
-

PHPMailer::DKIM_QP() code WP 6.4.3

public function DKIM_QP($txt)
{
    $line = '';
    $len = strlen($txt);
    for ($i = 0; $i < $len; ++$i) {
        $ord = ord($txt[$i]);
        if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord === 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) {
            $line .= $txt[$i];
        } else {
            $line .= '=' . sprintf('%02X', $ord);
        }
    }

    return $line;
}