1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-13 20:04:49 +02:00

Fix: Correctly decode X-Tags message headers (RFC 2047) (#344)

This commit is contained in:
Ralph Slooten
2024-08-09 14:26:43 +12:00
parent a21808df65
commit a060abd5fe

View File

@@ -50,7 +50,7 @@ func Store(body *[]byte) (string, error) {
ReplyTo: addressToSlice(env, "Reply-To"),
}
messageID := strings.Trim(env.Root.Header.Get("Message-ID"), "<>")
messageID := strings.Trim(env.GetHeader("Message-ID"), "<>")
created := time.Now()
// use message date instead of created date
@@ -116,7 +116,7 @@ func Store(body *[]byte) (string, error) {
tags := findTagsInRawMessage(body)
if !config.TagsDisableXTags {
xTagsHdr := env.Root.Header.Get("X-Tags")
xTagsHdr := env.GetHeader("X-Tags")
if xTagsHdr != "" {
// extract tags from X-Tags header
tags = append(tags, tools.SetTagCasing(strings.Split(strings.TrimSpace(xTagsHdr), ","))...)