Unverified Commit 26b4a546 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #793 from ikedas/issue-791 by ikedas

WWSympa: compose_mail: "Date:" field was omitted. Add it. (#791)
parents c95fd286 f74d8ed2
...@@ -14805,6 +14805,14 @@ sub do_send_mail { ...@@ -14805,6 +14805,14 @@ sub do_send_mail {
if $in_reply_to; if $in_reply_to;
$msg_string .= sprintf "Subject: %s\n", $encoded_subject $msg_string .= sprintf "Subject: %s\n", $encoded_subject
if defined $encoded_subject; if defined $encoded_subject;
# Format current time.
# If setting local timezone fails, fallback to UTC.
my $date =
(eval { DateTime->now(time_zone => 'local') } || DateTime->now)
->strftime('%a, %{day} %b %Y %H:%M:%S %z');
$msg_string .= sprintf "Date: %s\n", $date;
if (Conf::get_robot_conf($robot, 'use_html_editor')) { if (Conf::get_robot_conf($robot, 'use_html_editor')) {
$msg_string .= sprintf "Content-Type: text/html\n\n%s", $msg_string .= sprintf "Content-Type: text/html\n\n%s",
$in{'body'}; $in{'body'};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment