Incorrect date/time format used in emails sent by Hesk SMTP
Posted: Fri Dec 30, 2011 2:37 pm
Emails sent by Hesk SMTP show an incorrect receival time (10 hrs ahead in my case) in my Roundcube webmail client. A short investigation shows that Hesk is composing this date/time in file inc\email_functions.inc.php with code: Result: Thu, 29 Dec 2011 13:19:29 W. Europe Standard Time.
This is not according to RFC2822. IMHO it's better to use predefined date/time constants: Result: Thu, 29 Dec 2011 13:19:29 +0100
Patch:
Code: Select all
"Date: ".strftime("%a, %d %b %Y %H:%M:%S %Z"),
This is not according to RFC2822. IMHO it's better to use predefined date/time constants:
Code: Select all
"Date: " . date(DATE_RFC2822),
Patch:
Code: Select all
--- email_functions.inc_original.php 2011-10-19 20:08:58.000000000 +0200
+++ email_functions.inc_new.php 2011-12-29 16:03:01.002121100 +0100
@@ -82,7 +82,7 @@
"Reply-To: $hesk_settings[noreply_mail]",
"Return-Path: $hesk_settings[webmaster_mail]",
"Subject: " . $subject,
- "Date: ".strftime("%a, %d %b %Y %H:%M:%S %Z"),
+ "Date: " . date(DATE_RFC2822),
"Content-Type: text/plain; charset=".$hesklang['ENCODING']
), $message))
{