fix body injection and exit if no recipients left

This commit is contained in:
2022-03-14 11:49:32 +01:00
parent 018e87f51f
commit 023a8412e8
2 changed files with 4 additions and 6 deletions

View File

@@ -135,12 +135,9 @@ class MilterMessage(MIMEPart):
else:
parent.make_mixed()
maintype, subtype = ("multipart", "mixed")
elif subtype == "related":
parent.make_alternative()
maintype, subtype = ("multipart", "alternative")
text_body = parent.get_body(preferencelist=("plain"))
html_body = parent.get_body(preferencelist=("related", "html"))
html_body = parent.get_body(preferencelist=("html"))
if text_content is not None:
if text_body: