nd_Loader loadClass Zend_Mail Loading Zend_Mail Sending email foreach

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
nd_Loader::loadClass('Zend_Mail'); /** Loading Zend_Mail */
//======== Sending email ===========================
foreach ($ids as $key=>$q_id)
{
$mail = new Zend_Mail();
$part = $this -> part_quote -> getPartQuoteById($q_id);
$body = '<b>Part #:</b> '.$part['part_number'].'<br /><b>REV:</b> '.$part['rev'].'<br /><b>Description:</b> '.$part['description'];
$mail -> setBodyHtml($body);
$mail -> setFrom($this->user->member_email, $this->user->member_firstname);
//$mail -> addTo('sales@focuspdm.com', 'sales@focuspdm.com');
$mail -> addTo('anton.sinegribov@moveyourweb.net', 'anton.sinegribov@moveyourweb.net');
$mail -> setSubject('A RFQ just came in');
var_dump($mail->send());
die();
}