login about faq

I'd like to use the mime.savexml feature to convert a mime message to xml so we can parse and process it. At some point in the furture however we want to take the xml version of the message and recreate the mime data.

I build a small sample program that did the following

success = mime.LoadMimeFile("c:tempinput.eml")
success = mime.SaveXml("c:temptemp.xml")
success = mime.LoadXmlFile("c:temptemp.xml")
success = mime.SaveMime("c:tempoutput.eml")
I was expecting that the input.eml and output.eml to be the same. But there are differences. Should I expect them to be the same ? I can send you the files for review, just let me know.

asked Jul 26 '12 at 00:21

Aussie's gravatar image

Aussie
6112


You should expect whitespace differences in the header fields, and possible re-formatting w/ continuation lines to adhere to standards that would make the MIME the least troublesome possible.

link

answered Jul 26 '12 at 17:42

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

It is a bit worse than that. Can you please send me an email address I can forward examples to ?

link

answered Jul 29 '12 at 20:02

Aussie's gravatar image

Aussie
6112

Thanks. Yes, send it to support@chilkatsoft.com

link

answered Jul 30 '12 at 10:41

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thanks for the information. The differences are to be expected. The differences are:

1) Whitespace and header folding / continuation line differences.

2) Header field uppercase/lowercase differences. MIME header field names are case-insensitive, so this should make no difference. In addition, the header field names become XML tags, and therefore it's required that they are canonicalized to all lowercase in the XML representation. When translating back, the header fields are all lowercase. But again, this shouldn't make any difference.

3) The Base64 / quoted-printable line-lengths used in the MIME bodies might be changed. Chilkat will make sure the line-lengths are according to published standards. If the original MIME used non-standard line-lengths, there may be a difference. Again, this is inconsequential because the content is not actually changed -- only the encoded representation.

link

answered Jul 30 '12 at 17:07

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

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:

×1

Asked: Jul 26 '12 at 00:21

Seen: 732 times

Last updated: Jul 30 '12 at 17:07

Related questions

powered by OSQA