Hi All,
Its been a long time since I looked at the remail source code, so I
don't know whether this is still (or was ever) an issue in the stock
remail source. I discovered it a while back, when my app was using
excessive memory for large emails. This, in turn, sometimes led to
crashing.
At any rate, libEtPan uses mmap_string and files to deal with large
strings. It stores the files in a temporary directory.
Unfortunately, that directory is outside the sandbox that apps can
write to. For things to work properly, you need to initialize the
temporary directory to a place that apps can write to. I do this in
the AppDelegate:
mmap_string_set_tmpdir( [NSTemporaryDirectory() UTF8String] ) ;
This next line is less important, but it tells mmap_string to use
files for strings over 2MiB. I don't recall what the default is.
mmap_string_set_ceil(1024*1024*2);
-Rich