Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29755

Estimate the size of a new mail

$
0
0

We have a postfix server configured with message_size_limit=10240000 (the default) and I would now like to prevent the creation of any mail that is bigger than that. Because I get otherwise a "connection broken" error, which is difficult to present to the user in a meaningful error message.

The definition of message_size_limit is:

The maximal size in bytes of a message, including envelope information.

My question is: How can I calculate / predict / estimate the size in bytes of a created mail with lots of different attachments? javax.mail.Message.size() is only available when receiving a mail.


Viewing all articles
Browse latest Browse all 29755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>