feat: add HTML email body for --send (#48)

Add email.html config flag (default false). When enabled, --send
includes an HTML version of the report body generated via HTMLFormatter
alongside the plain-text part in a multipart/alternative message.

- EmailConfig gains html: bool field
- mailer.build_message/send_report accept rows for HTML generation
- CLI passes rows to send_report
- --init-config generates email.html: false
- README.md and docs/CONFIG.md updated

Bump version to 1.10.0.

Closes #48
This commit is contained in:
Кокос Артем Николаевич
2026-07-10 15:24:27 +07:00
parent 863ad50cc3
commit e1862462af
10 changed files with 323 additions and 28 deletions

View File

@@ -38,6 +38,7 @@ class EmailConfig:
subject: str = "Отчёт {author} за {period}"
body_text: str = "Во вложении отчёт."
attach: bool = True
html: bool = False
@dataclass
@@ -193,6 +194,7 @@ class AppConfig:
cls._safe_str(email_raw.get("body_text")) or "Во вложении отчёт."
),
attach=cls._safe_bool(email_raw.get("attach"), True),
html=cls._safe_bool(email_raw.get("html"), False),
)
@staticmethod