【问题标题】:Digital Ocean and GMAIL smtp server give errorDigital Ocean 和 GMAIL smtp 服务器报错
【发布时间】: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


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

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

      【讨论】:

      • 这不再是真的了。支持人员告诉您现在等待 60 天。这很疯狂。这些天我如何在没有 smtp 的情况下提供服务?不再有数字海洋!
      猜你喜欢
      • 2017-02-25
      • 2020-03-25
      • 2019-02-28
      • 1970-01-01
      • 1970-01-01
      • 2018-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多