0 votes
by (210 points)
edited

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
by (148k points)
edited
 
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.

by (210 points)
edited

Yup, that worked. Thank you!

...