MIME header order

0 votes
asked Dec 13, 2011 by powlette (210 points)
edited Dec 13, 2011

Is it possible to specify the order of the headers in a MIME message? I'm setting some meta-data headers that our in-house application requires to be first in the generated eml file that I'm creating. Is there any way to ensure they'll appear first?

If I can't explicitly order them, can I remove/re-add headers or some other hack to make this work?

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Dec 13, 2011 by Lukas Pokorny (97,590 points)
edited Dec 13, 2011
 
Best answer

You can't explicitly order them, but you can use use MimeHeaderCollection's Insert method to add headers at the start of the list. If you are working with MailMessage object's, use its Header properties to access the header collection.

commented Dec 13, 2011 by powlette (210 points)
edited Dec 13, 2011

Yup, that worked. Thank you!

...