We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bfb59a6 + 818a12d commit 6298c25Copy full SHA for 6298c25
fastapi_mail/msg.py
@@ -48,7 +48,10 @@ def __init__(self, entries) -> None:
48
self.subtype = entries.subtype
49
self.multipart_subtype = entries.multipart_subtype
50
self.headers = entries.headers
51
- self.msgId = make_msgid()
+ if self.headers and "message-id" in self.headers:
52
+ self.msgId = self.headers["message-id"]
53
+ else:
54
+ self.msgId = make_msgid()
55
56
def _mimetext(self, text: str, subtype: str) -> MIMEText:
57
"""
0 commit comments