fix: unwanted logs, typo

This commit is contained in:
Zichao Lin 2024-07-24 00:26:16 +08:00
parent 9147206d0f
commit 9a872d0ba3
Signed by: earthjasonlin
GPG Key ID: 406D9913DE2E42FB
2 changed files with 3 additions and 4 deletions

@ -23,8 +23,7 @@ def add_mask(original_msg, content):
original_subject = decode_mime_words(original_msg['Subject'])
from_name, from_address = parseaddr(original_msg['From'])
to_name, to_address = parseaddr(original_msg['To'])
print(original_msg)
header = f"""<table align=center style="background:#3d3d3d;padding:8px 16px;margin-top:30px;margin-bottom:30px;width:96%;border-radius:6px;max-width:1200px"width=100% bgcolor=#3D3D3D id=relay-email-header><tr><td style=font-size:xx-large;font-weight:bolder;color:#fff width=50% align=left>Forwarded Email<td style=color:#fff;text-align:right width=50% align=right><p>From: {from_name} >{from_address}&lt;<p>To: {to_name} >{to_address}&lt;<p>Subject: {original_subject}</table><table align=center style=padding:0;max-width:850px width=100%><tr><td style=padding-left:15px;padding-right:15px width=100%>"""
header = f"""<table align=center style="background:#3d3d3d;padding:8px 16px;margin-top:30px;margin-bottom:30px;width:96%;border-radius:6px;max-width:1200px"width=100% bgcolor=#3D3D3D id=relay-email-header><tr><td style=font-size:xx-large;font-weight:bolder;color:#fff width=50% align=left>Forwarded Email<td style=color:#fff;text-align:right width=50% align=right><p>From: {from_name} &lt;{from_address}&gt;<p>To: {to_name} &lt;{to_address}&gt;<p>Subject: {original_subject}</table><table align=center style=padding:0;max-width:850px width=100%><tr><td style=padding-left:15px;padding-right:15px width=100%>"""
footer = f"""<table align=center bgcolor=#3D3D3D style="background:#3d3d3d;padding:8px 16px;margin-top:30px;margin-bottom:30px;width:96%;border-radius:6px;max-width:1200px"width=100%><tr><td align=left style=color:#d22;font-size:xx-large;font-weight:bolder width=50%>FORWARDED<td align=right style=color:#fff;text-align:left width=50%><p style=font-size:x-large;font-weight:700;margin-block:0>Notice:<p style=margin-block:.1em>This is a automatically forwarded email, which means it may contains something bad.<p style=margin-block:.1em>You shouldn't reply directly to this email, it will never reach your destination!</table>"""
return header + content + footer

@ -25,8 +25,8 @@
Forwarded Email
</td>
<td width="50%" align="right" style="color: #ffffff; text-align: right;">
<p>From: {from_name} &gt;{from_address}&lt;</p>
<p>To: {to_name} &gt;{to_address}&lt;</p>
<p>From: {from_name} &lt;{from_address}&gt;</p>
<p>To: {to_name} &lt;{to_address}&gt;</p>
<p>Subject: {original_subject}</p>
</td>
</tr>