public function addAttachmentPartFromFile($filePath, $mimeType, $filename = null, $disposition = 'attachment')
    {
        $handle = Psr7\stream_for(fopen($filePath, 'r'));
        if ($filename === null) {
            $filename = basename($filePath);
        }
        $this->addAttachmentPart($handle, $mimeType, $filename, $disposition);
    }
public function addAttachmentPartFromFile($filePath, $mimeType, $filename = null, $disposition = 'attachment')
    {
        $handle = Psr7\stream_for(fopen($filePath, 'r'));
        if ($filename === null) {
            $filename = basename($filePath);
        }
        $this->addAttachmentPart($handle, $mimeType, $filename, $disposition);
    }
public function addAttachmentPartFromFile ( $ filePath , $ mimeType , $ filename = null , $ disposition = 'attachment' ) { $ handle = Psr7 \ stream_for ( fopen ( $ filePath , 'r' ) ) ; if ( $ filename === null ) { $ filename = basename ( $ filePath ) ; } $ this -> addAttachmentPart ( $ handle , $ mimeType , $ filename , $ disposition ) ; }
Adds an attachment part using the passed file.

Essentially creates a file stream and uses it.

@param string $filePath
@param string $mimeType
@param string $filename
@param string $disposition
Adds an attachment part using the passed file .