数字海洋和GMAIL smtp服务器给出错误



我在Digital Ocean Ubuntu 12.04.5 LTS(GNU/Linux 3.2.0-24-virtual i686)上使用Symfony2一切都在我的本地主机上工作,但在数字海洋服务器上不起作用,当我尝试在我的网络中注册启用了激活电子邮件的用户时,这是错误消息:

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

任何帮助将不胜感激。

谢谢

为了遏制垃圾邮件和滥用行为,DigitalOcean的一些新用户帐户默认阻止其SMTP端口。不幸的是,有时会出现误报。听起来你可能就是这种情况。如果您打开支持票证,团队将很乐意为您删除该块

作为临时解决方案,我更改了IP的 smtp.gmail.com您可以通过以下方式获取 IP:ping smtp.gmail.com在命令行上。

相关内容

最新更新