You are here

function PHPMailer::RFCDate in SMTP Authentication Support 5

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

Returns the proper RFC 822 formatted date. @access private

Return value

string

1 call to PHPMailer::RFCDate()
PHPMailer::CreateHeader in ./smtp.module
Assembles message header. @access private

File

./smtp.module, line 1879
Enables drupal to send email directly to an SMTP server using authentication. Uses the PHPMailer class by Brent R. Matzelle.

Class

PHPMailer
PHPMailer - PHP email transport class @package PHPMailer @author Brent R. Matzelle @copyright 2001 - 2003 Brent R. Matzelle

Code

function RFCDate() {
  $tz = date("Z");
  $tzs = $tz < 0 ? "-" : "+";
  $tz = abs($tz);
  $tz = $tz / 3600 * 100 + $tz % 3600 / 60;
  $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz);
  return $result;
}