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

        return $this;
    }