Fix date header on outgoing emails
This commit is contained in:
parent
e436780b47
commit
23650ac0c7
|
@ -221,7 +221,7 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) {
|
||||||
if subject, _ := header.Subject(); subject == "" {
|
if subject, _ := header.Subject(); subject == "" {
|
||||||
header.SetSubject(c.headers.subject.input.String())
|
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())
|
header.SetDate(time.Now())
|
||||||
}
|
}
|
||||||
if from, _ := mhdr.Text("From"); from == "" {
|
if from, _ := mhdr.Text("From"); from == "" {
|
||||||
|
|
Loading…
Reference in New Issue