sheltermanager / asm3

Animal Shelter Manager
GNU General Public License v3.0
108 stars 64 forks source link

Include subject in email document templates #1088

Closed bobintetley closed 1 year ago

bobintetley commented 2 years ago

One user asked if it was possible to include a subject in document templates used for emails.

They want to include a better description of (in this case) what someone is being requested to sign in the subject including things like the animal's name. Seems like a good idea to be able to do this generally. This mechanism wants to be generic and the angle bracket tokens need to work out without it even being noticed.

Suggest the use of double curly braces since they will be ignored by wordprocessor.substitute_tags

{{SUBJECT <> signing request}} {{FROM info@myshelter.com}} {{CC person@myshelter.com}} {{BCC person@myshelter.com}}

The code that handles templates for the emailform widget can then process the curly brace tags, where they will be ignored and become literal output in any other template.

bobintetley commented 2 years ago

Document in the manual under document templates. Mailmerge might have its own calls to generate templates.

patgaytx commented 2 years ago

I'm happy to test this when it's ready.

bobintetley commented 1 year ago

It makes no sense to allow the setting of the recipient fields from a template. {{FROM X}} is ok and {{SUBJECT X}}

Tetzor commented 1 year ago

Ticket complete.