email reply fixes
This commit is contained in:
parent
8653f319f7
commit
d58fb8841b
5 changed files with 100 additions and 85 deletions
|
|
@ -31,6 +31,21 @@ def log_outbound_mime_headers(message: Message) -> None:
|
|||
)
|
||||
|
||||
|
||||
def log_signed_mime_headers(message_bytes: bytes) -> None:
|
||||
"""Log threading headers from the final wire-format MIME (post-DKIM)."""
|
||||
parsed = BytesParser(policy=SMTP_POLICY).parsebytes(message_bytes)
|
||||
logger.info(
|
||||
"smtp_signed_mime_headers message_id=%s in_reply_to=%s references=%s "
|
||||
"from=%s to=%s subject=%s",
|
||||
parsed.get("Message-ID"),
|
||||
parsed.get("In-Reply-To"),
|
||||
parsed.get("References"),
|
||||
parsed.get("From"),
|
||||
parsed.get("To"),
|
||||
parsed.get("Subject"),
|
||||
)
|
||||
|
||||
|
||||
def _mime_attachment(part: ExtractedMimePart) -> MIMEBase:
|
||||
maintype, _, subtype = part.content_type.partition("/")
|
||||
if not subtype:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue