From 2559ebfac56a8060c8af001ba61709f3c4d78d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leszek=20Cima=C5=82a?= Date: Sun, 8 Dec 2019 19:49:41 +0100 Subject: remove garbage headers in reply message Very important fix. Remove garbage from reply message headers. Till now all Original fields were send in reply, which we do not want and could lead to uncorrect email message. --- widgets/compose.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'widgets') diff --git a/widgets/compose.go b/widgets/compose.go index 24af18c..c6c8015 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -469,7 +469,8 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) { // Merge in additional headers txthdr := mhdr.Header for key, value := range c.defaults { - if !txthdr.Has(key) && value != "" { + // skip all Original* defaults, they contain info about original message + if !txthdr.Has(key) && value != "" && !strings.HasPrefix(key, "Original") { mhdr.SetText(key, value) } } -- cgit v1.2.3