Report this

What is the reason for this report?

SMTP -> Impossible?

Posted on May 5, 2014

Hi! I’m running an app on ubuntu 12 that is based on CakePHP. I was just migrating the app and everything is working, but i have errors every time I try to send e-mails with my gmail account. This app is totally tested and work 100% but here in DigitalOcean the SMTP connection seems to be impossible…

any idea?

My basic config (and i know 100% it’s OK because the app is already working on at least 4 servers) is:

public $mail = array( ‘transport’ => ‘Smtp’, ‘host’ => ‘ssl://smtp.gmail.com’, ‘from’ => array(‘user@web.com’ => ‘Pretty Name here’), ‘port’ => 465, ‘timeout’ => 30, ‘username’ => ‘myname@mymail.com’, ‘password’ => ‘mypass’, ‘emailFormat’ => ‘html’ );

using CakePHP and CakeEmail function. As I said, everything works perfectly on other servers.

And no, it’s not a gmail ban, because I tried to install the app on another server after installing it here and everything is still working…

Any idea about why is SMTP blocked??

My cake say:

      Connection timed out

and the trace:

      CORE/Cake/Network/Email/SmtpTransport.php line 99
                CakeSocket->connect()
                protected function _connect(){
                          $this->_generateSocket()
                }

I’ve tried lot of thing, but nothing seems to work… any ideas? it’s a little big urgency ^ ^

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.