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.

