public function addFile($file)
    {
        if (!is_file($file)) {
            throw new MailException("File not found.", E_USER_ERROR);
        }

        $this->attachement[] = $file;

        return $this;
    }
public function addFile($file)
    {
        if (!is_file($file)) {
            throw new MailException("File not found.", E_USER_ERROR);
        }

        $this->attachement[] = $file;

        return $this;
    }
public function addFile ( $ file ) { if ( ! is_file ( $ file ) ) { throw new MailException ( "File not found." , E_USER_ERROR ) ; } $ this -> attachement [ ] = $ file ; return $ this ; }
Add an attachment file

@param string $file

@return Message

@throws MailException
Add an attachment file