Add "Date" header to mail, some clients require this to show corrent message receiving time.

This commit is contained in:
Stanislav N. aka pztrn 2014-11-02 10:19:15 +03:00 committed by Mikael Nordfeldth
parent c263bbcca7
commit fa4311fa17

View File

@ -148,6 +148,7 @@ function mail_to_user(&$user, $subject, $body, $headers=array(), $address=null)
$recipients = $address; $recipients = $address;
$profile = $user->getProfile(); $profile = $user->getProfile();
$headers['Date'] = date("r", time());
$headers['From'] = mail_notify_from(); $headers['From'] = mail_notify_from();
$headers['To'] = $profile->getBestName() . ' <' . $address . '>'; $headers['To'] = $profile->getBestName() . ' <' . $address . '>';
$headers['Subject'] = $subject; $headers['Subject'] = $subject;