Skip to content

Instantly share code, notes, and snippets.

@comensee
Created September 12, 2011 14:41
Show Gist options
  • Save comensee/1211431 to your computer and use it in GitHub Desktop.
Save comensee/1211431 to your computer and use it in GitHub Desktop.
class UserController extends controller\Action {
.....
public function motdepasseoublieAction(){
......
$html = new Ano_ZFTwig_View();
$html->setScriptPath(APPLICATION_PATH . '/views/scripts/');
$html->assign('password', 'xoxoxo');
$html->assign('user', "[email protected]");
$mail = new Zend_Mail('utf-8');
// render view
$bodyText = $html->render('mails/motdepasseoublie.twig');
// configure base stuff
$mail->addTo("[email protected]");
$mail->setSubject("Nouveau mot de passe");
$mail->setFrom('[email protected]','monsite');
$mail->setBodyHtml($bodyText);
$mail->send();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment