go-gmime
go-gmime copied to clipboard
Headers() needs to use textproto.Mimeheader.Set() instead of modifying the map directly
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.
I've created PR https://github.com/sendgrid/go-gmime/pull/47 for fixing this.
@ericychoi @xdsxc this can be closed, I think.