aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go4
-rw-r--r--widgets/compose.go14
2 files changed, 11 insertions, 7 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index ae8319bc..8aa1e2c9 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -196,6 +196,10 @@ func (aerc *Aerc) Config() *config.AercConfig {
return aerc.conf
}
+func (aerc *Aerc) Logger() *log.Logger {
+ return aerc.logger
+}
+
func (aerc *Aerc) SelectedAccount() *AccountView {
acct, ok := aerc.accounts[aerc.tabs.Tabs[aerc.tabs.Selected].Name]
if !ok {
diff --git a/widgets/compose.go b/widgets/compose.go
index a2fa6631..8fc34b4c 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
}