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?

asked 13 Dec '11, 12:33

powlette's gravatar image

powlette
291
accept rate: 0%


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.

link

answered 13 Dec '11, 15:56

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

Yup, that worked. Thank you!

(13 Dec '11, 15:59) powlette
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×9
×5

Asked: 13 Dec '11, 12:33

Seen: 157 times

Last updated: 13 Dec '11, 15:59