$this->name, "Content" => $this->data, "ContentType" => $this->mimeType ?: "application/octet-stream", "ContentId" => $this->name, ); return $retval; } private function __construct( $base64EncodedData, $attachmentName, $mimeType = "application/octet-stream" ) { $this->name = $attachmentName; $this->data = $base64EncodedData; $this->mimeType = $mimeType; } }