Skip to content

Send WordPress backup cleanup email report as HTML - #23

Merged
locus313 merged 1 commit into
mainfrom
feature/html-email-report
Aug 25, 2026
Merged

Send WordPress backup cleanup email report as HTML#23
locus313 merged 1 commit into
mainfrom
feature/html-email-report

Conversation

@locus313

Copy link
Copy Markdown
Collaborator

Summary

The emailed report was plain text and got unreadable with many domains.
Now the email is sent as HTML with:

  • A styled summary table (domains scanned, backups found, backups removed)
  • A "Backups removed by domain" list (only domains with something removed,
    with filenames as a nested list)
  • A zebra-striped "Backups found by domain" table

Console and dry-run terminal output are unchanged (still plain text).

Delivery

  • Correct Content-Type: text/html header set on both paths:
    • Local mail command via -a "Content-Type: text/html; charset=UTF-8"
    • SMTP/curl fallback via MIME-Version: 1.0 + Content-Type headers in
      the raw message

Testing

  • shellcheck clean (pre-existing intentional-glob info only)
  • Manual test with stubbed mail: captured and verified well-formed HTML
    output with correct headers
  • Manual test with stubbed curl (SMTP path): verified MIME headers and
    HTML body
  • README and script header docs updated

Console/dry-run output still uses the plain-text report, but the emailed
report is now HTML: a styled summary table, a "removed by domain" list with
filenames, and a zebra-striped "found by domain" table. Sent with the
correct Content-Type header via both the local mail command (-a header)
and the SMTP/curl fallback (MIME-Version + Content-Type headers).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@locus313
locus313 merged commit b6c1562 into main Aug 25, 2026
1 check passed
@locus313
locus313 deleted the feature/html-email-report branch August 25, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant