Writing outgoing mail works correctly now.

 Previously there was a minor error which lead to NULL bytes
 being output at the end of our reading attempts.