src/Mime/MimePartBinaryFile.php
public static function fromLocalPath($path, $name = "")
    {
        if ($name == "") {
            $name = basename($path);
        }

        $part = new MimePartBinaryFile();
        $part->setTransformedBody(file_get_contents($path));
        $part->addHeader("Content-Disposition", "attachment; filename=\"" . $name . "\"");

        return $part;
    }
public static function fromLocalPath($path, $name = "")
    {
        if ($name == "") {
            $name = basename($path);
        }

        $part = new MimePartBinaryFile();
        $part->setTransformedBody(file_get_contents($path));
        $part->addHeader("Content-Disposition", "attachment; filename=\"" . $name . "\"");

        return $part;
    }
public static function fromLocalPath ( $ path , $ name = "" ) { if ( $ name == "" ) { $ name = basename ( $ path ) ; } $ part = new MimePartBinaryFile ( ) ; $ part -> setTransformedBody ( file_get_contents ( $ path ) ) ; $ part -> addHeader ( "Content-Disposition" , "attachment; filename=\"" . $ name . "\"" ) ; return $ part ; }
Creates an instance to represent a file stored locally.

@param $path
@param string $name
@return MimePartBinaryFile
Creates an instance to represent a file stored locally .