I’m working on a part of a website where I generate PDFs, attach them to an email and send it off. Right now I am not tracking the current sum of the sizes of all the PDFs to be attached to the email, but I suspect at one point that I should.
My question boils down to: What is a good theoretical MAX_SIZE that you should go by when managing attachments to emails.
For example, when the sum of the sizes of the PDFs I am generating reaches MAX_SIZE, I would add those PDFs to an email and then send it off. Then I would create a new email, add the remaining PDF attachments to it and send it off. Repeat ad nauseam until all PDFs are sent.
Given the answers you’ve seen and my experience, it comes down to knowing your users.
Are your users on your intranet? Check the attachment policy of the user set.
Are the users anywhere on the internet? Then I recommend you examine your user base and decide the % threshold you’re willing to risk refusals from.
For example, if you have, say 50% AOL users, 20% gmail users, 20% hotmail, 5% yahoo, 5% misc. – you could argue you are willing to risk that 5% of your emails are rejected – so take the minimum size allowed by AOL, gmail, hotmail, and yahoo.
The other thing you might consider is ensuring that you have a way to monitor the messages that are rejected due to attachment size – then communicate with those people to let them know they need larger attachment limits to use your service.
Etc. etc… in summary, break the problem down, research the acceptable tolerances, and try to handle the outliers in a way that does not degrade the experience of your main audience.
Good luck,
-james