0
我试图找到一种在Zend中调试电子邮件的同等方式,就像我可以在cakePHP中一样。在发送测试邮件之前,我想看看我的测试结果。我可以将电子邮件发送给我自己,并以这种方式工作,但我觉得这很乏味。Zend电子邮件调试
//zend mail
$mail = new Zend_Mail();
$mail->setBodyHTML($content);
$mail->setBodyText($content);
$mail->setFrom('[email protected]', 'Security Notification');
$mail->addTo('[email protected]');
$mail->setSubject('(Security Notify) New Security Request');
//$mail->send();
//Equivalent to this from cakePHP
$this->Email->delivery = 'debug';
$this->Email->send('test message');
debug($this->Session->read('Message.email'));
die();
是这样的:死亡($ MAIL-> getBodyHtml())或死亡(的print_r($电子邮件)) – 2012-07-20 17:16:12
@DirkMcQuickly你能请张贴此作为一个答案,所以我可以接受这是正确的答案? – Stirling 2012-07-31 15:08:13