public function postInsert($event) { try { nahoMail::send('Вас добавили в друзья!', nahoMail::getBody('partial', 'people/notify_addfriend', array('friend' => $this)), $this->getFriend()->getProfile()->getEMail()); } catch (Exception $e) { } }
private function _resetPass() { if ($this->usuario) { if ($this->usuario->getEmail() != "") { $clave = $this->_generar_clave(); $this->usuario->setClave(md5($clave)); $this->usuario->save(); $body = nahoMail::getBody('partial', 'seguridad/mail.resetpass', array('usuario' => $this->usuario, 'clave' => $clave)); $from = 'Alba <*****@*****.**>'; nahoMail::send('[Alba] Restablecer clave', $body, $this->usuario->getEmail(), array('from' => $from)); $this->resultado = "El mail ha sido enviado a " . $this->usuario->getEmail(); } else { $this->resultado = "El usuario no posee una direccion de correo electronico valida"; } } else { $this->resultado = "El usuario no existe"; } }