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

@@ -76,6 +76,7 @@ def _run_init_config(config_path: str, force: bool) -> int:
"no_time": False,
},
"email": {
"html": False,
"smtp": {
"host": "",
"port": 587,
@@ -209,7 +210,13 @@ def _save_and_maybe_send(
return 1
try:
send_report(email_config, output_arg, author, f"{from_date}--{to_date}")
send_report(
email_config,
output_arg,
author,
f"{from_date}--{to_date}",
rows=rows,
)
print(f"📧 Report sent to {', '.join(email_config.to)}")
except RedmineAPIError as e:
print(f"{e.message}", file=sys.stderr)