(If there is a better place to ask this, let me know.)
A lot of email servers limit the combined size of files attached to incoming emails. Like, for example, maybe some email server disallows messages larger than 20MB; it would fail if an attachment is 22MB, and it would also fail if one attachment is 10MB and a second attachment is 12MB. Most email servers implement some sort of limit like this example, but the total allowed size varies depending on which.
Here's the part I don't understand though - does that size limit only apply to attachments? or does it apply to the total size of the email? Like, lets say that a hypothetical email has an attachment that is exactly 19.98MB. But, the body of the email message is 0.03MB. Assuming that the receiving email server has a limit of 20MB, would that arrive? or fail to arrive? Or maybe whether that particular example succeeds or fails depending on which email server is hypothetically receiving it?
Technically, there is no difference between the message body and the attachments. Both the body and the attachments are equally parts of a multipart or multipurpose email message, as defined in RFC 2045.
The message size limits are typically against the total length of the message including all the parts and the headers. Such limit can also be advertised with a Message Size Declaration reply to the
EHLO command, and the RFC 1870 also provides a definition for the size limit in section 5:
The message size is defined as the number of octets, including CR-LF pairs, but not the SMTP
DATAcommand's terminating dot or doubled quoting dots, to be transmitted by the SMTP client after receiving reply code
The fixed maximum message size is defined as the message size of the largest message that a server is ever willing to accept. An attempt to transfer any message larger than the fixed maximum message size will always fail.
Also notice that binary attachments must be converted to 7-bit ASCII text. Base64 encoding is used for this, causing 37% overhead (33% by the encoding itself; 4% more by the inserted line breaks; RFC 2045, 6.8). For this reason you may not be able to send attachments despite they are smaller than the limit.
External links referenced by this document: