fix: catch exception while setting In-Reply-To in email header

This commit is contained in:
prssanna 2020-09-05 13:14:12 +05:30
parent c8016584b0
commit d94a1313f0

View file

@ -207,7 +207,11 @@ 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"""
self.msg_root["In-Reply-To"] = 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
def make(self):
"""build into msg_root"""