Skip Menu |

This queue is for tickets about the mime-construct CPAN distribution.

Report information
The Basics
Id: 111372
Status: new
Priority: 0/
Queue: mime-construct

People
Owner: Nobody in particular
Requestors: mail [...] maciej.szmigiero.name
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: mime-construct should include "Date" field in messages
Date: Fri, 22 Jan 2016 18:45:59 +0100
To: bug-mime-construct [...] rt.cpan.org
From: "Maciej S. Szmigiero" <mail [...] maciej.szmigiero.name>
Currently, mime-construct does not include "Date" field in generated messages. This field is required according to RFC 5322 and not every MTA or SMTP client adds it when it is missing (for example msmtp doesn't). A possible fix is to use Email::Date::Format to easily format "Date" field value: --- a/mime-construct 2012-10-07 21:01:11.849644407 +0200 +++ b/mime-construct 2015-02-24 00:00:15.843791068 +0100 @@ -28,6 +28,7 @@ # - continue long header lines I construct use Proc::WaitStat qw(close_die); +use Email::Date::Format qw(email_date); (my $Me = $0) =~ s-.*/--; my # new line required for makemaker @@ -491,6 +492,7 @@ push @output, cont "To: ", join(", ", @to), "\n" if @to; push @output, cont "Cc: ", join(", ", @cc), "\n" if @cc; + push @output, cont "Date: ", email_date, "\n"; push @output, cont "Subject: $subject\n" if $subject ne ''; push @output, $header if $header ne ''; This would also require adding Email::Date::Format to mime-construct dependencies. Best regards, Maciej Szmigiero