include "To:" in plaintext fetch

This commit is contained in:
Alexander Weinhold 2017-08-09 16:36:59 +02:00
parent ddd2bacbae
commit 7a5c19a935

View File

@ -155,8 +155,9 @@ func FetchPlaintext(p *Parameters) ([]string, []error) {
errs = append(errs, pErrs...) errs = append(errs, pErrs...)
date := mail.Header.Get("Date") date := mail.Header.Get("Date")
from := mail.Header.Get("From") from := mail.Header.Get("From")
to := mail.Header.Get("To")
subject := mail.Header.Get("Subject") subject := mail.Header.Get("Subject")
m := fmt.Sprintf("Date: %s\nFrom: %s\nSubject: %s\n\n%s", date, from, subject, strings.Join(parts, "\n\n")) m := fmt.Sprintf("Date: %s\nFrom: %s\nTo: %s\nSubject: %s\n\n%s", date, from, to, subject, strings.Join(parts, "\n\n"))
mailsPlain = append(mailsPlain, m) mailsPlain = append(mailsPlain, m)
} }
return mailsPlain, errs return mailsPlain, errs