"""
+ header = f"""Forwarded Email | From: {from_name} <{from_address}> To: {to_name} <{to_address}> Subject: {original_subject} |
"""
footer = f"""FORWARDED | Notice: This is a automatically forwarded email, which means it may contains something bad. You shouldn't reply directly to this email, it will never reach your destination! | """
return header + content + footer
@@ -81,8 +81,7 @@ def get_unforwarded_emails(account_config, logger):
for response_part in data:
if isinstance(response_part, tuple):
msg = email.message_from_bytes(response_part[1])
- if 'Forwarded' not in msg['Subject']:
- emails.append((email_id, msg))
+ emails.append((email_id, msg))
imap.logout()
if len(emails) > 0:
logger.info(f"Retrieved {len(emails)} new emails from {account_config['email']}")
diff --git a/template.html b/template.html
index 21f9b2e..c6b276e 100644
--- a/template.html
+++ b/template.html
@@ -1,5 +1,4 @@
|
|