From f664cca6b58b3a3e39a200be36144578fa0612ff Mon Sep 17 00:00:00 2001
From: 1sonhador <1sonhador@gmail.com>
Date: Wed, 1 Jul 2026 09:15:01 +0100
Subject: [PATCH] fix: forward invoice PDF/XML/ZIP attachments instead of .eml
wrapper
The outbound SMTP relay rejects message/rfc822 attachments named .eml.
Send the matched invoice files directly to BizDocs, which aligns with
the allowed relay extensions and the product filter rules.
---
README.md | 2 +-
admin-ui/src/pages/Accounts.tsx | 2 +-
src/forwarder/email/parsing.py | 69 ++++++++++++++++++++++++-
src/forwarder/email/smtp_client.py | 71 +++++++++++++++++++++-----
src/forwarder/services/sync_service.py | 16 ++++--
tests/test_smtp_forward.py | 51 ++++++++++++++++++
6 files changed, 191 insertions(+), 20 deletions(-)
create mode 100644 tests/test_smtp_forward.py
diff --git a/README.md b/README.md
index 4e7586e..61a2e8a 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# BizDocs Forwarder
-Multi-account IMAP → BizDocs forwarder: detect invoice attachments (PDF/XML/ZIP), re-send via SMTP as `.eml`.
+Multi-account IMAP → BizDocs forwarder: detect invoice attachments (PDF/XML/ZIP), re-send via SMTP.
- **Repo:** https://git.bitreport.pt/BitReport.pt/forwarder
- **Paperclip:** http://10.10.50.17:3100/BIT/projects/bizdocs-forwarder
diff --git a/admin-ui/src/pages/Accounts.tsx b/admin-ui/src/pages/Accounts.tsx
index 1e8f695..e3337b1 100644
--- a/admin-ui/src/pages/Accounts.tsx
+++ b/admin-ui/src/pages/Accounts.tsx
@@ -131,7 +131,7 @@ function AccountModal({