public function addAttachment($filename, $data, $content_id = null) {
    $this->addAttachmentsArray([["name" => $filename,
                                 "data" => $data,
                                 "content_id" => $content_id]]);
  }