I am developing a payment module. I don\'t find proper documentation anywhere for Magento System.
As of now I am facing a problem in capture method of Payment Metho
The problem was Mag::Log($payment) I removed it and its working like a magic.
Problem in your code is on this line
'<email>'.$paymentInfo->getOrder()->getBillingAddress()->email().'</email>'.
There is no email() function, you can use `''.$paymentInfo->getOrder()->getBillingAddress()->getEmail().''. to retrive email.
This error is btw sent to store owner email. If you are developing on localhost, I would recommed you to use some emulation of smtp, for example (for win) http://www.toolheap.com/test-mail-server-tool/ and then you can see all email sent by Magento.
And second note. Instead of ugly curl, you can use Varien_Http_Client (Zend_Http_Client) shipped with Magento. You can see example in my post - https://stackoverflow.com/a/9233290/858586