src/Sendables/Email/Email.php
public function addAttachment($path, $newName = "")
    {
        if ($newName == "") {
            $newName = basename($path);
        }

        $file = new \stdClass();
        $file->path = $path;
        $file->name = $newName;

        $this->attachments[] = $file;

        return $this;
    }
public function addAttachment($path, $newName = "")
    {
        if ($newName == "") {
            $newName = basename($path);
        }

        $file = new \stdClass();
        $file->path = $path;
        $file->name = $newName;

        $this->attachments[] = $file;

        return $this;
    }
public function addAttachment ( $ path , $ newName = "" ) { if ( $ newName == "" ) { $ newName = basename ( $ path ) ; } $ file = new \ stdClass ( ) ; $ file -> path = $ path ; $ file -> name = $ newName ; $ this -> attachments [ ] = $ file ; return $ this ; }
Adds an attachment

@param string $path The path to the local file
@param string $newName Optionally specify a new name for the file.
@return $this
Adds an attachment