I have a custom module that sends email on localhost but now when I uploaded it to a live server, it generates an exception saying that "Unable to send mail."
Note: emails are enabled on the server and it sends registration or other emails. I think it is not a duplicate question as in this: Magento e-mail sending does not work question email never got delivered. where as in my case registration/order emails are successfully delivering.