diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-07 21:56:48 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-07 21:56:48 +0200 |
commit | dcd8b2cff159017ebbf1b0b02cb0d60b1248627d (patch) | |
tree | 6cc1275ca5bedb6cfff97951f39321601ff99e66 /internal/feed/mail.go | |
parent | 7197e2880981cd4205485cc8724d741948df60de (diff) | |
download | feed2imap-go-dcd8b2cff159017ebbf1b0b02cb0d60b1248627d.tar.gz feed2imap-go-dcd8b2cff159017ebbf1b0b02cb0d60b1248627d.tar.bz2 feed2imap-go-dcd8b2cff159017ebbf1b0b02cb0d60b1248627d.zip |
Add header X-Feed2Imap-GUID
Diffstat (limited to 'internal/feed/mail.go')
-rw-r--r-- | internal/feed/mail.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/feed/mail.go b/internal/feed/mail.go index a763ef8..0a8bd10 100644 --- a/internal/feed/mail.go +++ b/internal/feed/mail.go @@ -57,10 +57,13 @@ func (item *item) buildHeader() message.Header { h.SetContentType("multipart/alternative", nil) h.SetAddressList("From", item.fromAddress()) h.SetAddressList("To", item.toAddress()) + h.Set("Message-Id", item.messageId()) h.Set(msg.VersionHeader, version.Version()) h.Set(msg.ReasonHeader, strings.Join(item.reasons, ",")) h.Set(msg.IdHeader, item.id()) - h.Set("Message-Id", item.messageId()) + if item.GUID != "" { + h.Set(msg.GuidHeader, item.GUID) + } { // date date := item.DateParsed() |