code: public void addPart(AttachmentPart part) {
          if (attachments == null) {
              attachments = new BodyPart.Attachments();
          }
  
          this.attachments.add(part);
      }
docs: Adds new attachment part.
  @param part