From 7a5c19a9354e34fbd4d3304470245ccf6125d3dd Mon Sep 17 00:00:00 2001 From: Alexander Weinhold Date: Wed, 9 Aug 2017 16:36:59 +0200 Subject: [PATCH] include "To:" in plaintext fetch --- libUnreadMail.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libUnreadMail.go b/libUnreadMail.go index e008807..63a6222 100644 --- a/libUnreadMail.go +++ b/libUnreadMail.go @@ -155,8 +155,9 @@ func FetchPlaintext(p *Parameters) ([]string, []error) { errs = append(errs, pErrs...) date := mail.Header.Get("Date") from := mail.Header.Get("From") + to := mail.Header.Get("To") 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) } return mailsPlain, errs