public function attach($filename)
    {
        try {
            $this->mailer->AddAttachment($filename);
        } catch (phpmailerException $e) {
            throw new EmailException($e->getMessage(), $e->getCode());
        }

        return $this;
    }
public function attach($filename)
    {
        try {
            $this->mailer->AddAttachment($filename);
        } catch (phpmailerException $e) {
            throw new EmailException($e->getMessage(), $e->getCode());
        }

        return $this;
    }
public function attach ( $ filename ) { try { $ this -> mailer -> AddAttachment ( $ filename ) ; } catch ( phpmailerException $ e ) { throw new EmailException ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } return $ this ; }
Attaches the file specified to the email.

@param string $filename The absolute filename of the file to attach

@return void
Attaches the file specified to the email .