fix: unwanted logs, typo
This commit is contained in:
parent
9147206d0f
commit
9a872d0ba3
3
main.py
3
main.py
@ -23,8 +23,7 @@ def add_mask(original_msg, content):
|
|||||||
original_subject = decode_mime_words(original_msg['Subject'])
|
original_subject = decode_mime_words(original_msg['Subject'])
|
||||||
from_name, from_address = parseaddr(original_msg['From'])
|
from_name, from_address = parseaddr(original_msg['From'])
|
||||||
to_name, to_address = parseaddr(original_msg['To'])
|
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}><p>To: {to_name} <{to_address}><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} >{from_address}<<p>To: {to_name} >{to_address}<<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>"""
|
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
|
return header + content + footer
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
Forwarded Email
|
Forwarded Email
|
||||||
</td>
|
</td>
|
||||||
<td width="50%" align="right" style="color: #ffffff; text-align: right;">
|
<td width="50%" align="right" style="color: #ffffff; text-align: right;">
|
||||||
<p>From: {from_name} >{from_address}<</p>
|
<p>From: {from_name} <{from_address}></p>
|
||||||
<p>To: {to_name} >{to_address}<</p>
|
<p>To: {to_name} <{to_address}></p>
|
||||||
<p>Subject: {original_subject}</p>
|
<p>Subject: {original_subject}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user