Skip to content

Instantly share code, notes, and snippets.

@kwylez
Created September 24, 2010 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwylez/595396 to your computer and use it in GitHub Desktop.
Save kwylez/595396 to your computer and use it in GitHub Desktop.
<?php
//Example Code
private function _notifyGroup() {
$data = array();
$data = $this->getForm()->getValues();
/**
* Setup view instance to pass to notifier
*/
$view = new Zend_View();
/**
* Assign all form data to view property
*/
$view->assign("formvalues", $data);
/**
* Location of view scripts
*/
$view->addScriptPath(dirname(__FILE__).'/../../../../views');
$body = $view->render('email-templates/mir.phtml');
/**
* Custom notify class that abstracts different 'notify' methodologies. For example you can notfiy
* by writing to a log or email. Email can be Zend_Mail, PEAR or plain ol' php mail()
*/
$notifier = CW_Notify::factory('mail_zend', $body, $options['email']);
$notifier->notify();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment