Pagekit\Mail\Message::attachFile PHP Method

attachFile() public method

Attaches a file to the message.
public attachFile ( string $file, string $name = null, string $mime = null ) : self
$file string
$name string
$mime string
return self
    public function attachFile($file, $name = null, $mime = null)
    {
        return $this->prepareAttachment(Swift_Attachment::fromPath($file), $name, $mime);
    }