public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-57-gdebaf7a
@ 2017-04-08 13:42 jturney
0 siblings, 0 replies; only message in thread
From: jturney @ 2017-04-08 13:42 UTC (permalink / raw)
To: cygwin-apps-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-08 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-08 13:42 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20160705-57-gdebaf7a jturney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).