【发布时间】:2014-11-27 04:07:02
【问题描述】:
它正在我的 localhost 上运行。但是在实时服务器上不起作用。 它显示以下错误 无法与主机 smtp.gmail.com 建立连接 [连接超时 #110] 如何解决?
还有我的 app/config/mail.php
<?php
return array(
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 465,
'from' => array('address' => 'myaddress', 'name' => 'Name'),
'encryption' => 'ssl',
'username' => 'myemail@gmail.com',
'password' => 'mypassword',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
);
【问题讨论】:
-
您可能想进一步充实您的问题,否则您将得不到答案。例如,您如何发送邮件(php 邮件或 laravel Mail::send()?)以及您的 app/config/mail.php 设置是什么?
-
问题可能是您的防火墙阻止了 IP。尝试将 SMTP IP 列入白名单。
Answer found here -
也许这会有所帮助? goo.gl/mFdE9M
-
不确定这是否有用? stackoverflow.com/questions/25769615/…