go-gmime icon indicating copy to clipboard operation
go-gmime copied to clipboard

Headers() needs to use textproto.Mimeheader.Set() instead of modifying the map directly

Open ericychoi opened this issue 1 year ago • 2 comments

https://github.com/sendgrid/go-gmime/blame/5544c54b141c13fa6ac0b4ddc162a65dab1dc8bb/gmime/envelope.go#L64

When Canonical form of the key is different from the actual key, headers().Values() would not return the right value, since the internal map doesn't have the canonical form as the key. Users can get the values by treating Mimeheader as a map as a workaround- but this is confusing and can cause unexpected consequences.

ericychoi avatar Mar 24 '23 05:03 ericychoi

I've created PR https://github.com/sendgrid/go-gmime/pull/47 for fixing this.

naspeh avatar Jul 04 '24 10:07 naspeh

@ericychoi @xdsxc this can be closed, I think.

naspeh avatar Aug 12 '24 17:08 naspeh