This is an automated email from the ASF dual-hosted git repository.

sebb 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 9384034  Headers are normally capitalised
9384034 is described below

commit 9384034f8df6d767e9f6494aa9eb5a45f6aac81d
Author: Sebb <[email protected]>
AuthorDate: Sat Nov 13 13:00:13 2021 +0000

    Headers are normally capitalised
---
 server/endpoints/compose.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/endpoints/compose.py b/server/endpoints/compose.py
index 0b49663..561bf18 100644
--- a/server/endpoints/compose.py
+++ b/server/endpoints/compose.py
@@ -65,15 +65,15 @@ async def process(
         if to and subject and body:
             msg = email.message.EmailMessage()
             if irt:
-                msg["in-reply-to"] = irt
+                msg["In-reply-to"] = irt
             if references:
-                msg["references"] = references
-            msg["from"] = email.utils.formataddr(
+                msg["References"] = references
+            msg["From"] = email.utils.formataddr(
                 (str(email.header.Header(session.credentials.name, "utf-8")), 
session.credentials.email)
             )
-            msg["to"] = to
-            msg["subject"] = str(email.header.Header(subject, "utf-8"))
-            msg["date"] = email.utils.formatdate()
+            msg["To"] = to
+            msg["Subject"] = str(email.header.Header(subject, "utf-8"))
+            msg["Date"] = email.utils.formatdate()
             msg["X-Sender"] = "Apache Pony Mail Foal Composer v/%s" % 
COMPOSER_VERSION
             msg.set_charset("utf-8")
             msg.set_content(body)

Reply via email to