From 23650ac0c7173fcecfc727f1f4db52aeb168a3b9 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 17 May 2019 11:05:21 -0400 Subject: Fix date header on outgoing emails --- widgets/compose.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/compose.go b/widgets/compose.go index 18fe38ce..31c0a2d7 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 == "" { -- cgit