code: function addAttachmentFromBase64Data($filename, $mimetype, $contents) {
          $attachment = new Attachment($filename, $mimetype, $contents);
          $this->attachments[] = $attachment;
      }
docs: Adds an attachment to this transaction from a string that contains base64-encoded data.
  @param $filename the file name to use when sending the attachment as an e-mail
  @param $mimetype the mime type of the attachment
  @param $contents a string containing binary data, e.g. as returned from fread().