protected function sendRegBasicEmail($values) { $template = new Template(APP_DIR . "/templates/mails/basicRegMail.phtml"); $template->registerFilter(new LatteFilter()); $template->setTranslator($this->getTranslator()); $template->homepageLink = $this->link("//:Front:Files:list"); $template->login = $values['username']; $template->password = $values['password']; $template->title = $this->translate('Registration'); $mail = new Mail(); $mail->addTo($values['email']); $mail->setFrom(Environment::getConfig("contact")->registrationEmail); $mail->setSubject($template->title); $mail->setHTMLbody($template); $mail->send(); $this->flashMessage('E-mail has been sent to provided e-mail address.', self::FLASH_MESSAGE_SUCCESS); }