@Override
 public void setEncoding(String encoding) throws MessagingException {
   if (mBody != null) {
     mBody.setEncoding(encoding);
   }
   setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, encoding);
 }
Пример #2
0
  public void writeTo(OutputStream out) throws IOException, MessagingException {

    BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024);
    mHeader.writeTo(out);
    writer.write("\r\n");
    writer.flush();
    if (mBody != null) {
      mBody.writeTo(out);
    }
  }