Templates remember who they're for #72

Merged
jcoffey-dev merged 1 commits from feature/template-recipients into main 2026-10-20 20:54:19 +00:00
1 Commits
Author SHA1 Message Date
jcoffey-dev 0aad7dd71d Templates remember who they're for
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
ci / publish (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m56s
ci / docker-build (pull_request) Skipped
ci / announce (pull_request) Skipped
A template saved a subject and a body, so a message sent to the same
people every time (an invoice, a weekly report) had to be addressed by
hand each time.

A template can now hold To, Cc and Bcc as well:

- Settings > Templates has the three fields, with the composer's own
  suggestions, and each template's card lists who it adds;
- inserting it adds them to the message beside anyone already there; an
  address already on the message, in any field, isn't added twice, and
  the Cc and Bcc rows open when the template uses them;
- {{recipientName}} and the other placeholders see the template's own
  recipients, so "Dear {{recipientFirstName}}" names the person it's for;
- "Save as template" in the composer keeps the message's recipients.

Templates saved before this have none and insert exactly as they did.

New strings: 5 ("To (optional)", "Cc (optional)", "Bcc (optional)",
"Adds: {recipients}" and the field hint), in all ten catalogs.

Reported in coffey-labs/ihasmail#58
2026-10-20 13:35:04 -07:00