implement buffered write only for emails larger than 4 MB