You are here

public function PHPMailer::DKIM_QP in SMTP Authentication Support 7

Same name and namespace in other branches
  1. 7.2 smtp.phpmailer.inc \PHPMailer::DKIM_QP()

Set the private key file and password to sign the message.

@access public

Parameters

string $key_filename Parameter File Name:

string $key_pass Password for private key:

1 call to PHPMailer::DKIM_QP()
PHPMailer::DKIM_Add in ./smtp.phpmailer.inc
Create the DKIM header, body, as new header

File

./smtp.phpmailer.inc, line 2204
The mail handler class in smtp module, based on code of the phpmailer library, customized and relicensed to GPLv2.

Class

PHPMailer
PHPMailer - PHP email transport class NOTE: Requires PHP version 5 or later @package PHPMailer @author Andy Prevost @author Marcus Bointon @copyright 2004 - 2009 Andy Prevost

Code

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