compose: allow setting all headers in templates

Allow setting To, Cc, Subject, Bcc in template headers.

Signed-off-by: Robin Jarry <>
Robin Jarry 2022-02-03 09:54:23 +01:00
parent 77b3a141a4
commit dc6fd7c15e
2 changed files with 6 additions and 2 deletions

View File

@ -26,6 +26,10 @@ Chuck
If you have a template that doesn't add any header, it *must* be preceded by a
newline, to avoid parsing parts of the body as header text.
All headers defined in the template will have precedence over any headers that
are initialized by aerc (e.g. Subject, To, From, Cc) when composing a new
message, forwarding or replying.
The following data can be used in templates. Though they are not all

View File

@ -109,11 +109,11 @@ func NewComposer(aerc *Aerc, acct *AccountView, conf *config.AercConfig,
focused: 1,
completer: cmpl,
c.buildComposeHeader(aerc, cmpl)
if err := c.AddTemplate(template, templateData); err != nil {
return nil, err
c.buildComposeHeader(aerc, cmpl)