【发布时间】:2015-03-13 11:50:59
【问题描述】:
我在 Digital Ocean Ubuntu 12.04.5 LTS(GNU/Linux 3.2.0-24-virtual i686)上使用 Symfony2。 一切都在我的本地主机上运行,但在 Digital Ocean Server 上无法运行, 当我尝试在启用了激活电子邮件的网络中注册用户时,出现以下错误消息:
Connection could not be established with host smtp.gmail.com [Connection timed out #110]
500 Internal Server Error - Swift_TransportException
和错误堆栈跟踪:
$this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, stream_context_create($options));
if (false === $this->_stream) {
throw new Swift_TransportException(
'Connection could not be established with host '.$this->_params['host'].
' ['.$errstr.' #'.$errno.']'
);
从服务器终端输出:
yusuf@xwzxc:~$ telnet smtp.gmail.com 465
Trying 74.125.130.108...
Trying 74.125.130.109...
Trying 2404:6800:4003:c01::6c...
telnet: Unable to connect to remote host: Network is unreachable
任何帮助将不胜感激。
谢谢
【问题讨论】:
标签: symfony smtp gmail swiftmailer digital-ocean