aboutsummaryrefslogtreecommitdiff
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-06-21 14:33:09 -0400
committerDrew DeVault <sir@cmpwn.com>2019-06-21 14:33:09 -0400
commitceeb30abeb5c55da0f1e54a5cfe06afcf5d9c356 (patch)
tree5ba994267e6449ffcdb5335a4a0745c6a0b4472d /widgets/compose.go
parent63538978f3c4ff1a5662b62754c4783405239b91 (diff)
Fix Cc & Bcc handling in replies
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index a2fa663..8fc34b4 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -228,6 +228,13 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) {
}
header.SetAddressList("From", simon_from)
}
+ // Merge in additional headers
+ txthdr := mhdr.Header
+ for key, value := range c.defaults {
+ if !txthdr.Has(key) && value != "" {
+ mhdr.SetText(key, value)
+ }
+ }
if to := c.headers.to.input.String(); to != "" {
// Dammit Simon, this branch is 3x as long as it ought to be because
// your types aren't compatible enough with each other
@@ -267,13 +274,6 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) {
rcpts = append(rcpts, addr.Address)
}
}
- // Merge in additional headers
- txthdr := mhdr.Header
- for key, value := range c.defaults {
- if !txthdr.Has(key) && value != "" {
- mhdr.SetText(key, value)
- }
- }
return &header, rcpts, nil
}