public function PHPMailer::DKIM_QP

5.x PHPMailer.php public PHPMailer::DKIM_QP($txt)

Quoted-Printable-encode a DKIM header.

Parameters

string $txt:

Return value

string

1 call to PHPMailer::DKIM_QP()
PHPMailer::DKIM_Add in inc/PHPMailer/src/PHPMailer.php
Create the DKIM header and body in a new message header.

File

inc/PHPMailer/src/PHPMailer.php, line 4288

Class

PHPMailer
PHPMailer - PHP email creation and transport class.

Namespace

PHPMailer\PHPMailer

Code

public function DKIM_QP($txt) 
 {
  $line = '';
  $len = strlen($txt);
  for ($i = 0; $i < $len; ++$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;
}