Merge change 20819

* changes:
  Use new Rfc822Output class for sending mail; fix bug in Rfc822Output