concrete/src/Mail/Service.php
public function addRawAttachmentWithHeaders($content, $filename, array $headers = [])
    {
        $headers += [
            'mimetype' => 'application/octet-stream',
            'disposition' => Mime::DISPOSITION_ATTACHMENT,
            'encoding' => Mime::ENCODING_BASE64,
            'charset' => '',
            'boundary' => '',
            'id' => '',
            'description' => '',
            'location' => '',
            'language' => '',
        ];
        $mp = new MimePart($content);
        $mp
            ->setFileName($filename)
            ->setType($headers['mimetype'])
            ->setDisposition($headers['disposition'])
            ->setEncoding($headers['encoding'])
            ->setCharset($headers['charset'])
            ->setBoundary($headers['boundary'])
            ->setId($headers['id'])
            ->setDescription($headers['description'])
            ->setLocation($headers['location'])
            ->setLanguage($headers['language'])
        ;
        $this->attachments[] = $mp;
    }
public function addRawAttachmentWithHeaders($content, $filename, array $headers = [])
    {
        $headers += [
            'mimetype' => 'application/octet-stream',
            'disposition' => Mime::DISPOSITION_ATTACHMENT,
            'encoding' => Mime::ENCODING_BASE64,
            'charset' => '',
            'boundary' => '',
            'id' => '',
            'description' => '',
            'location' => '',
            'language' => '',
        ];
        $mp = new MimePart($content);
        $mp
            ->setFileName($filename)
            ->setType($headers['mimetype'])
            ->setDisposition($headers['disposition'])
            ->setEncoding($headers['encoding'])
            ->setCharset($headers['charset'])
            ->setBoundary($headers['boundary'])
            ->setId($headers['id'])
            ->setDescription($headers['description'])
            ->setLocation($headers['location'])
            ->setLanguage($headers['language'])
        ;
        $this->attachments[] = $mp;
    }
public function addRawAttachmentWithHeaders ( $ content , $ filename , array $ headers = [ ] ) { $ headers += [ 'mimetype' => 'application/octet-stream' , 'disposition' => Mime :: DISPOSITION_ATTACHMENT , 'encoding' => Mime :: ENCODING_BASE64 , 'charset' => '' , 'boundary' => '' , 'id' => '' , 'description' => '' , 'location' => '' , 'language' => '' , ] ; $ mp = new MimePart ( $ content ) ; $ mp -> setFileName ( $ filename ) -> setType ( $ headers [ 'mimetype' ] ) -> setDisposition ( $ headers [ 'disposition' ] ) -> setEncoding ( $ headers [ 'encoding' ] ) -> setCharset ( $ headers [ 'charset' ] ) -> setBoundary ( $ headers [ 'boundary' ] ) -> setId ( $ headers [ 'id' ] ) -> setDescription ( $ headers [ 'description' ] ) -> setLocation ( $ headers [ 'location' ] ) -> setLanguage ( $ headers [ 'language' ] ) ; $ this -> attachments [ ] = $ mp ; }
Add a mail attachment by specifying its raw binary data, specifying the headers of the mail MIME part.

@param string $content The binary data of the attachemt
@param string $filename The name to give to the attachment (it will be used as the filename part of the Content-Disposition header)
@param array $headers Additional headers fo the MIME part. Valid values are:
- mimetype: the main value of the Content-Type header [default: application/octet-stream]
- disposition: the main value of the Content-Disposition header [default: attachment]
- encoding: the value of the Content-Transfer-Encoding header [default: base64]
- charset: the charset value of the Content-Type header
- boundary: the boundary value of the Content-Type header
- id: the value of the Content-ID header (without angular brackets)
- description: the value of the Content-Description header
- location: the value of the Content-Location header
- language: the value of the Content-Language header
Add a mail attachment by specifying its raw binary data specifying the headers of the mail MIME part .