public static function PHPMailer::rfcDate

5.x PHPMailer.php public static PHPMailer::rfcDate()

Return an RFC 822 formatted date.

Return value

string

1 call to PHPMailer::rfcDate()
PHPMailer::createHeader in inc/PHPMailer/src/PHPMailer.php
Assemble message headers.

File

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

Class

PHPMailer
PHPMailer - PHP email creation and transport class.

Namespace

PHPMailer\PHPMailer

Code

public static function rfcDate() 
 {
  // Set the time zone to whatever the default is to avoid 500 errors
  // Will default to UTC if it's not set properly in php.ini
  date_default_timezone_set(@date_default_timezone_get());

  return date('D, j M Y H:i:s O');
}