mozilla-b2g/gaia — pull request #9986 by leob2g (2013-05-24 12:58:40+00:00)
Title: Bug 871852 - [Email] Email sending fails silently when sending large (fo...

...r an email) files (ex: 25 MB), No limit on max attachments size

Implementation is done as below.
1) Limited max attachment size to 5120000bytes (5MB)
2) When attaching from composer we can attach only one image at a time, so we check whether that total attachment size including the image does not exceed 5MB.
3) From gallery we can attach multiple files, the current implementation inserts the number of attachments that can be allowed in the composer and shows the alert to user.

Notes:
AFAIK gallery supports displaying of images max size 2.5 MB , so we would not get a scenario of single attachments exceeding the max limit. However as per suggested string locales are taken care for such case as well.

Please review