This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 1eca16b Add date header
1eca16b is described below
commit 1eca16bab4fa1c5a1687cea9ec669fcf4f550278
Author: Daniel Gruno <[email protected]>
AuthorDate: Mon Nov 1 20:14:59 2021 +0100
Add date header
---
server/endpoints/compose.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/server/endpoints/compose.py b/server/endpoints/compose.py
index d7e7e21..5994ccc 100644
--- a/server/endpoints/compose.py
+++ b/server/endpoints/compose.py
@@ -19,6 +19,7 @@
import plugins.server
import plugins.session
import email.message
+import email.utils
import aiosmtplib
import fnmatch
import typing
@@ -66,6 +67,7 @@ async def process(
msg["from"] = "%s <%s>" % (session.credentials.name,
session.credentials.email)
msg["to"] = to
msg["subject"] = subject
+ msg["date"] = email.utils.formatdate()
msg["X-Sender"] = "Apache Pony Mail Foal Composer v/0.1"
msg.set_charset("utf-8")
msg.set_content(body)