fix(Email): replace newline characters in In-Reply-To in email header

(cherry picked from commit 3f2827bf03ecf57c20e9583bd40c43faccde16b8)
This commit is contained in:
prssanna 2020-09-07 16:20:28 +05:30 committed by mergify-bot
parent 821792f4b4
commit baa9afc945

View file

@ -207,11 +207,7 @@ class EMail:
def set_in_reply_to(self, in_reply_to):
"""Used to send the Message-Id of a received email back as In-Reply-To"""
try:
self.msg_root["In-Reply-To"] = in_reply_to
except ValueError:
# in_reply_to may contain line feed characters, so ignore in that case
pass
self.msg_root["In-Reply-To"] = in_reply_to.replace("\r", "").replace("\n", "")
def make(self):
"""build into msg_root"""