rename original email attachment and change notification text
This commit is contained in:
@@ -297,14 +297,14 @@ class Modification:
|
|||||||
msg = MIMEPart()
|
msg = MIMEPart()
|
||||||
msg.add_header("MIME-Version", "1.0")
|
msg.add_header("MIME-Version", "1.0")
|
||||||
msg.set_content(
|
msg.set_content(
|
||||||
"Please see the original email attached to this email.")
|
"Please see the original email attached.")
|
||||||
msg.add_alternative(
|
msg.add_alternative(
|
||||||
"Please see the original email attached to this email.",
|
"Please see the original email attached.",
|
||||||
subtype="html")
|
subtype="html")
|
||||||
fp.seek(0)
|
fp.seek(0)
|
||||||
msg.add_attachment(
|
msg.add_attachment(
|
||||||
fp.read(), maintype="plain", subtype="text",
|
fp.read(), maintype="plain", subtype="text",
|
||||||
filename="original_email.eml")
|
filename=f"{qid}.eml")
|
||||||
html_body = msg.get_body(preferencelist=("html"))
|
html_body = msg.get_body(preferencelist=("html"))
|
||||||
text_body = msg.get_body(preferencelist=("plain"))
|
text_body = msg.get_body(preferencelist=("plain"))
|
||||||
# content and mime headers may have to be updated because
|
# content and mime headers may have to be updated because
|
||||||
|
|||||||
Reference in New Issue
Block a user