QUOTE (mdRafn @ Nov 19 2014, 05:47 PM)
I have tried just about everything, and Googled until I've run out of answers...
I am trying to connect to my GMail account via php script to send emails (as NS continually keeps getting blacklisted on shared hosting).
I have tried using GMail application specific authentication, Captcha unlocking, and just about everything else I could find on stackoverflow. I have tried php mail() and swiftmailer. I keep getting a connection timeout. I am wondering if something set at NS is preventing connection to a remote server?
Here is my Swiftmailer snippet:
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465,'ssl')
echo 'Transport started = '.$transport->isStarted();
with this message after about 20 secs...
Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection timed out #110]'
So--my question is, is it possible to connect to GMail via smtp from shared hosting at NS? If so, how?
The hosting firewall blocks connections on ports other than 80 and 443, so it won't work.