email - In remote host: Connection could not be established with host smtp.gmail.com [Connection timed out #110] -
after deploying gettin error below when try send mail:
500 | internal server error | swift_transportexception connection not established host smtp.gmail.com [connection timed out #110] stack trace
* @ () in sf_root_dir/lib/vendor/symfony/lib/vendor/swiftmailer/classes/swift/transport/streambuffer.php line 235 ... 232. } 233. if (!$this->_stream = fsockopen($host, $this->_params['port'], $errno, $errstr, $timeout)) 234. { 235. throw new swift_transportexception( 236. 'connection not established host ' . $this->_params['host'] . 237. ' [' . $errstr . ' #' . $errno . ']' 238. ); * @ swift_transport_streambuffer->_establishsocketconnection() in sf_root_dir/lib/vendor/symfony/lib/vendor/swiftmailer/classes/swift/transport/streambuffer.php line 70 ... 67. break; 68. case self::type_socket: 69. default: 70. $this->_establishsocketconnection(); 71. break; 72. } 73. } * @ swift_transport_streambuffer->initialize(array('protocol' => 'ssl', 'host' => 'smtp.gmail.com', 'port' => 465, 'timeout' => 30, 'blocking' => 1, 'type' => 1)) in sf_root_dir/lib/vendor/symfony/lib/vendor/swiftmailer/classes/swift/transport/abstractsmtptransport.php line 101 ... 98. 99. try 100. { 101. $this->_buffer->initialize($this->_getbufferparams()); 102. } 103. catch (swift_transportexception $e) 104. { * @ swift_transport_abstractsmtptransport->start() in sf_root_dir/lib/vendor/symfony/lib/vendor/swiftmailer/classes/swift/mailer.php line 74 ... 71. 72. if (!$this->_transport->isstarted()) 73. { 74. $this->_transport->start(); 75. } 76. 77. return $this->_transport->send($message, $failedrecipients); * @ swift_mailer->send(object('swift_message'), array()) in sf_root_dir/lib/vendor/symfony/lib/mailer/sfmailer.class.php line 300 ... 297. return $this->realtimetransport->send($message, $failedrecipients); 298. } 299. 300. return parent::send($message, $failedrecipients); 301. } 302. 303. /** * @ sfmailer->send(object('swift_message')) in sf_root_dir/lib/vendor/symfony/lib/mailer/sfmailer.class.php line 263 ... 260. */ 261. public function composeandsend($from, $to, $subject, $body) 262. { 263. return $this->send($this->compose($from, $to, $subject, $body)); 264. } 265. 266. /** * @ sfmailer->composeandsend('tirengar@gmail.com', 'tirengarfio@hotmail.com', 'confirm registration', 'hello fjklsdjf,<br/><br/> <a href="http://www.tirengarfio.com/rs5/web/frontend_dev.php/register/confirm/m/19">click here confirm registration</a><br/><br/> login information can found below:<br/><br/> username: fjklsdjf<br/> password: m') in sf_root_dir/plugins/sfdoctrineguardextraplugin/modules/sfguardregister/lib/basesfguardregisteractions.class.php line 89 ... 86. $user->getemailaddress(), 87. 'confirm registration', 88. $message 89. ); 90. } 91. 92. /** * @ basesfguardregisteractions->sendregisterconfirmmail(object('sfguarduser'), 'm') in sf_root_dir/plugins/sfdoctrineguardextraplugin/modules/sfguardregister/lib/basesfguard
this configuration in factories.yml.
all: mailer: param: delivery_strategy: realtime transport: class: swift_smtptransport param: host: smtp.gmail.com port: 465 encryption: ssl username: tirengarfio password: xxxx
the port 465 open remote host. no problem in localhost.
any idea?
-- javi
ubuntu 8.04
i have taken these instructions directly gmail site.
you have use @gmail.com in username.
outgoing mail (smtp) server - requires tls: smtp.gmail.com (use authentication) use authentication: yes use starttls: yes (some clients call ssl) port: 465 or 587 account name: full email address (including @gmail.com) google apps users, please enter username@your_domain.com password: gmail password
Comments
Post a Comment