login about faq

Lets say, i have an email file. This e-mail file is about 10GB. (With attachments 50mb each and many...)

em.LoadEml(‘C:myemail.eml’); em.GetAttachments().....

In this example, if i load this file with loademl method, will this email file loaded to memory? But what if i have 4GB of RAM?

What is the correct way of parsing and split to pieces for this email file?

asked Feb 18 '13 at 09:58

chilkat's gravatar image

chilkat ♦♦

Given that Chilkat Email and MIME were designed to hold the entire email (i.e. MIME) in-memory, it's not possible to load a 10GB email into an email object (or a MIME object).

One approach might be this: Assuming the top-level MIME header is multipart/mixed, write code to load enough of the MIME into a memory string to capture the 1st header (I'm sure no more than 5K would be needed). Then load this string into a Chilkat MIME object. This is only for the purpose of easily extracting the boundary string. Once you have the boundary string, you may discard the MIME header you just loaded.

With the boundary-string known, you may now write code that opens the 10GB file and scans for the next occurrence of the boundary string. Save each of the MIME parts delimited by the boundary strings to separate files. Don't include the boundary string in each file, and make sure each file begins with the 1st header line of the sub-part. At this point, each of these sub-part files are themselves MIME, and may be loaded individually into Chilkat MIME objects for processing.


answered Feb 18 '13 at 10:06

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Feb 18 '13 at 09:58

Seen: 1,043 times

Last updated: Feb 18 '13 at 10:06

powered by OSQA