How to use MySQL 'RAND()' with limit in with Zend Select Query

  We need to use new Zend_Db_Expr('RAND()') with select query
  Ex: $selectQry    =    $this->util->db->select()->from(array('P'=>$this->_name),array('package_id','name','day_duration','night_duration','price','discount_price'))
                                                    ->order(new Zend_Db_Expr('RAND()'))
                                                    ->limit(2);

Html email using Zend Framework

Create a template in the view /views/scripts/emails/package.phtml
html
body
 echo $this->packageType;
echo $this->details; 
/html

Then in the controller, from which you need to send this use the below code

// create zend view object
$html = new Zend_View();
$html->setScriptPath(APPLICATION_PATH . '/views/scripts/emails/');

// assign the view variables here
$html->assign('packageType', 'Luxure');
$html->assign('details', 'Package inclusions');

// create mail object with utf-8 encoding
$mail = new Zend_Mail('utf-8');

// render view
$bodyText = $html->render('package.phtml');

//Set emaill
$mail->addTo('shaijudavis@gmail.com');
$mail->setSubject('Welcome to Limespace.de');
$mail->setFrom('info@elegantkerala.com','Elegant Kerala');
$mail->setBodyHtml($bodyText);
$mail->send();