Whenever I run a simple send email function using Email::Send::Gmail I get this error:
[Mon Jan 28 11:37:57 2013] [error] [client 31.171.245.] Error sending email: Email::Send::Gmail: error connecting to server smtp.gmail.com at /usr/local/share/perl5/Email/Send.pm line 252, referer: http://**.cgi
However, exact same code is working when run from command line. And smtp.gmail.com is available when telneting from command line. It this because of the persistence or am I missing something?
Alrgiht, I got it. Seems selinux on CentOS was blocking outside connections from httpd, thus the script was not connecting.
You need to enter this
In order to connect.