code: public void addAttachment(Attachment attachment, long length) throws IOException {
          this.attachments.add(attachment);
          contentLength += partBoundary.length;
          contentLength += 6; // 3 * crlf
          contentLength += length;
      }
docs: Add an attachment to be streamed as a subsequent MIME body.
  Depending on the underlying attachment type, (eg file), this is done without loading the
  entire attachment into memory.
  
  @param attachment The attachment to be streamed
  @param length     Size in bytes of attachment, as it will be transmitted over the network
  (that is, after any encoding)
  @throws IOException if there was an error getting the input stream from the {@code
  Attachment}