public function attach($file)
    {
        if (empty($file)) {
            throw new MailerException('a file is required to use attach!');
        } elseif (!file_exists($file)) {
            throw new MailerException("$file does not exist!");
        }

        $this->_mailer->addAttachment($file);

        return $this;
    }
public function attach($file)
    {
        if (empty($file)) {
            throw new MailerException('a file is required to use attach!');
        } elseif (!file_exists($file)) {
            throw new MailerException("$file does not exist!");
        }

        $this->_mailer->addAttachment($file);

        return $this;
    }
public function attach ( $ file ) { if ( empty ( $ file ) ) { throw new MailerException ( 'a file is required to use attach!' ) ; } elseif ( ! file_exists ( $ file ) ) { throw new MailerException ( "$file does not exist!" ) ; } $ this -> _mailer -> addAttachment ( $ file ) ; return $ this ; }
Attaches a file to the email.

@param string $file

@return \Scara\Mail\Mailer
Attaches a file to the email .