This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-57-gdebaf7a




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=debaf7a24f5c21ba130c6ffd8cbcd5486f57bd0a

commit debaf7a24f5c21ba130c6ffd8cbcd5486f57bd0a
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sat Apr 8 14:12:31 2017 +0100

    Ensure calm's email have Message-Id: and Date: headers


Diff:
---
 calm/buffering_smtp_handler.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/calm/buffering_smtp_handler.py b/calm/buffering_smtp_handler.py
index 13fca18..0025a5b 100644
--- a/calm/buffering_smtp_handler.py
+++ b/calm/buffering_smtp_handler.py
@@ -24,6 +24,7 @@
 import logging
 import logging.handlers
 import email.message
+import email.utils
 
 from . import common_constants
 
@@ -56,6 +57,8 @@ class BufferingSMTPHandler(logging.handlers.BufferingHandler):
             m['To'] = ','.join(self.toaddrs)
             m['Bcc'] = common_constants.ALWAYS_BCC
             m['Subject'] = self.subject
+            m['Message-Id'] = email.utils.make_msgid()
+            m['Date'] = email.utils.formatdate()
             m['X-Calm'] = '1'
 
             # use utf-8 only if the message can't be ascii encoded


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]