e-mail attachments are stored as base64, so actual e-mail body will be about 2 times bigger, so we have 20mb
json_encode (at senders side) also can add base64 overhead, so we can have about 40mb for single file_get_contents call, then json_decode will need about 20mb, add some local variables, and at least 1 loop - and 100mb is exhausted
I suggest you to read about: memory_get_usage - use it to trace where php allocates memory
then use unset and gc_collect_cycles
UPDATE: I'm not sure why json_decode needs so much memory (maybe some bug, update php?), anyway in php.ini
register_globals = off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
always_populate_raw_post_data = Off
You 2nd question: base64
Thus, the actual length of MIME-compliant Base64-encoded binary data is usually about 137% of the original data length
JSON should not add big overhead, but additional encoding of mail body into json could probably use base64 again