code: protected MimePart setupAttachmentPart(CardView view, SMailPostingMessage message, SMailAttachment attachment) {
          assertArgumentNotNull("view", view);
          assertArgumentNotNull("message", message);
          assertArgumentNotNull("attachment", attachment);
          final MimePart part = newMimeBodyPart();
          final OptionalThing<String> textEncoding = getAttachmentTextEncoding(view, attachment);
          final DataSource source = prepareAttachmentDataSource(view, message, attachment, textEncoding);
          final String contentType = buildAttachmentContentType(view, attachment, textEncoding);
          final String contentDisposition = buildAttachmentContentDisposition(view, attachment, textEncoding);
          try {
              part.setDataHandler(createDataHandler(source));
              if (!isSuppressAttachmentTransferEncoding(view)) {
                  part.setHeader("Content-Transfer-Encoding", getAttachmentTransferEncoding(view));
              }
              part.setHeader("Content-Type", contentType);
              part.setHeader("Content-Disposition", contentDisposition);
          } catch (MessagingException e) {
              String msg = "Failed to set headers: " + attachment;
              throw new SMailMessageSettingFailureException(msg, e);
          }
          return part;
      }
docs: ===============