Zend_Mail is not working as expected

For programming and general questions on Zend Framework

Zend_Mail is not working as expected

Postby niroonline on Sun Jan 13, 2013 10:18 am

I have got php application written using zend framework 1.12

I have action which is supposed to send some emails , I have put the following code inside the action

$mail = new Zend_Mail();
$mail->setBodyText('This is an example message body');
$mail->setFrom('<from email>', 'Chris Hope');
$mail->addTo('<to email>, 'John Smith');
$mail->setSubject('This is an example subject');
$mail->send();
This action is run without getting the error but I never receive the email

But when I comment out the above code and use php mail() , it sends the emmail and I am receiving the email also.

Please advise me how to set it up, I have hosted the application in hostgator.
niroonline
 
Posts: 2
Joined: Sun Jan 13, 2013 10:04 am

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 3 guests

cron