public static function PHPMailer::RFCDate in SMTP Authentication Support 7
Same name and namespace in other branches
- 5 smtp.module \PHPMailer::RFCDate()
- 7.2 smtp.phpmailer.inc \PHPMailer::RFCDate()
Returns the proper RFC 822 formatted date. @access public
@static
Return value
string
1 call to PHPMailer::RFCDate()
- PHPMailer::CreateHeader in ./
smtp.phpmailer.inc - Assembles message header. @access public
File
- ./
smtp.phpmailer.inc, line 1944 - 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 static function RFCDate() {
$tz = date('Z');
$tzs = $tz < 0 ? '-' : '+';
$tz = abs($tz);
$tz = (int) ($tz / 3600) * 100 + $tz % 3600 / 60;
$result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
return $result;
}