src/Archangel.php
protected function buildAttachmentContent($path)
    {
        if (!file_exists($path)) {
            $this->logger->error("Could not find file {$path} for attaching to Archangel mail.");
            return '';
        }

        $handle = fopen($path, 'r');
        $contents = fread($handle, filesize($path));
        fclose($handle);

        $contents = base64_encode($contents);
        $contents = chunk_split($contents);
        return $contents;
    }
protected function buildAttachmentContent($path)
    {
        if (!file_exists($path)) {
            $this->logger->error("Could not find file {$path} for attaching to Archangel mail.");
            return '';
        }

        $handle = fopen($path, 'r');
        $contents = fread($handle, filesize($path));
        fclose($handle);

        $contents = base64_encode($contents);
        $contents = chunk_split($contents);
        return $contents;
    }
protected function buildAttachmentContent ( $ path ) { if ( ! file_exists ( $ path ) ) { $ this -> logger -> error ( "Could not find file {$path} for attaching to Archangel mail." ) ; return '' ; } $ handle = fopen ( $ path , 'r' ) ; $ contents = fread ( $ handle , filesize ( $ path ) ) ; fclose ( $ handle ) ; $ contents = base64_encode ( $ contents ) ; $ contents = chunk_split ( $ contents ) ; return $ contents ; }
File reader for attachments

@param string $path filepath of the attachment

@return string binary representation of file, base64'd
File reader for attachments