enmime icon indicating copy to clipboard operation
enmime copied to clipboard

Feature request: ordered headers

Open iredmail opened this issue 3 years ago • 1 comments

Dear @jhillyerd,

Mail headers stored in header attribute is unordered (the underlying type of *textproto.MIMEHeader is map[string][]string): https://github.com/jhillyerd/enmime/blob/5cd80012a864d71e2fe03bae39079080a4896160/envelope.go#L28

I wonder whether you're willing to accept PR to make it an ordered map instead. Since header is an internal attribute, i expect no breaking changes will be introduced.

Ordered headers is very useful when you just modified part of mail body and want to keep the order.

iredmail avatar May 16 '22 11:05 iredmail

This sounds good to me.

jhillyerd avatar May 16 '22 14:05 jhillyerd