public function addAttachment($filename, $data, $content_id = null) {
    $this->addAttachmentsArray([["name" => $filename,
                                 "data" => $data,
                                 "content_id" => $content_id]]);
  }
public function addAttachment($filename, $data, $content_id = null) {
    $this->addAttachmentsArray([["name" => $filename,
                                 "data" => $data,
                                 "content_id" => $content_id]]);
  }
public function addAttachment ( $ filename , $ data , $ content_id = null ) { $ this -> addAttachmentsArray ( [ [ "name" => $ filename , "data" => $ data , "content_id" => $ content_id ] ] ) ; }
Adds an attachment to the Message object.

@param string $filename Filename of the attachment.
@param mixed $data File data of the attachment.
@param string $content_id Optional Content-ID header value of the
attachment. Must be enclosed by angle brackets (<>).
@throws \InvalidArgumentException If the input is not an array or if the
attachment type is invalid (i.e. the filename is not a string, or the
file extension is blacklisted).
Adds an attachment to the Message object .