Send WordPress backup cleanup email report as HTML - #23
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The emailed report was plain text and got unreadable with many domains.
Now the email is sent as HTML with:
with filenames as a nested list)
Console and dry-run terminal output are unchanged (still plain text).
Delivery
Content-Type: text/htmlheader set on both paths:mailcommand via-a "Content-Type: text/html; charset=UTF-8"MIME-Version: 1.0+Content-Typeheaders inthe raw message
Testing
shellcheckclean (pre-existing intentional-glob info only)mail: captured and verified well-formed HTMLoutput with correct headers
curl(SMTP path): verified MIME headers andHTML body