compose: allow setting all headers in templates
Allow setting To, Cc, Subject, Bcc in template headers. Fixes: https://todo.sr.ht/~rjarry/aerc/19 Signed-off-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
77b3a141a4
commit
dc6fd7c15e
|
@ -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.
|
||||
|
||||
# MESSAGE DATA
|
||||
|
||||
The following data can be used in templates. Though they are not all
|
||||
|
|
|
@ -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)
|
||||
|
||||
c.AddSignature()
|
||||
|
||||
c.updateGrid()
|
||||
|
|
Loading…
Reference in New Issue