If i m running this code in localhost, it's working fine. but when i uploading this file to server it's getting me stuck..
giving me error like : can't connect to smtp host : mail.horoscopesauction.com port:465
Looks like you couldn't reach that mail server from your web server. Did you check if you can access the mail server from a mail client program? If you can, then the problem might be on the server, i.e firewall blocks port 465.