Commit 5d5ac66a authored by Maxime Besson's avatar Maxime Besson
Browse files

Add Date: field to emails (#1953)

This adds a dependancy to Email::Date::Format, but it's already a
dependancy of Email::Sender::Simple (and probably more), so in practice
no new packages are going to be installed
parent adb20393
......@@ -270,7 +270,8 @@ Depends: ${misc:Depends},
libclone-perl,
liblemonldap-ng-handler-perl (= ${binary:Version}),
libtext-unidecode-perl,
libregexp-assemble-perl
libregexp-assemble-perl,
libemail-date-format-perl
Recommends: libcrypt-openssl-bignum-perl,
libconvert-base32-perl,
libemail-sender-perl (>=1.300027) | libemail-sender-transport-smtps-perl,
......
......@@ -11,6 +11,7 @@ use JSON qw(from_json);
use MIME::Entity;
use Email::Sender::Simple qw(sendmail);
use Email::Sender::Transport::SMTP qw();
use Email::Date::Format qw(email_date);
use MIME::Base64;
use Encode;
......@@ -186,6 +187,7 @@ sub send_mail {
),
Subject => $subject,
Type => 'multipart/related',
Date => email_date,
);
# Attach HTML message
......@@ -217,6 +219,7 @@ sub send_mail {
Data => $body,
Type => 'text/plain',
Charset => $self->charset,
Date => email_date,
);
}
......
Markdown is supported
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