diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-05-17 11:05:21 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-05-17 11:05:21 -0400 |
commit | 23650ac0c7173fcecfc727f1f4db52aeb168a3b9 (patch) | |
tree | 9c1c340ff93ff9d903a5f43a9d4bef38dbb9bd62 /widgets/compose.go | |
parent | e436780b4746fc7eb2dbbd804e4d7dc5cf5fef63 (diff) | |
download | aerc-23650ac0c7173fcecfc727f1f4db52aeb168a3b9.tar.gz |
Fix date header on outgoing emails
Diffstat (limited to 'widgets/compose.go')
-rw-r--r-- | widgets/compose.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go index 18fe38c..31c0a2d 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -221,7 +221,7 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) { if subject, _ := header.Subject(); subject == "" { header.SetSubject(c.headers.subject.input.String()) } - if date, err := header.Date(); err != nil && date != (time.Time{}) { + if date, err := header.Date(); err != nil || date == (time.Time{}) { header.SetDate(time.Now()) } if from, _ := mhdr.Text("From"); from == "" { |