简体   繁体   English

Laravel 3-错误:与smtp.gmail.com的连接:465超时

[英]Laravel 3 - error: Connection to smtp.gmail.com:465 Timed Out

I want to send email through laravel-3, but i am facing one error like this: 我想通过laravel-3发送电子邮件,但我面临这样的一个错误:

ERROR: Connection to smtp.gmail.com:465 Timed Out

I am using Swiftmailer Messages-master bundle to send emails, and I have written this code in my controller: 我正在使用Swiftmailer Messages-master捆绑包发送电子邮件,并且我已经在控制器中编写了以下代码:

Config::set('messages::config.transports.smtp.host', 'smtp.gmail.com');
Config::set('messages::config.transports.smtp.port', 465);
Config::set('messages::config.transports.smtp.username','abc@gmail.com');
Config::set('messages::config.transports.smtp.password', 'mypassword');
Config::set('messages::config.transports.smtp.encryption', 'ssl');

Message::send(function($message)
{
    $message->to('xyz@gmail.com');
    $message->from('abc@gmail.com', 'Kishan Vadaliya');

    $message->subject('Email checking');
    $message->body('hii i am very happy for send this email through laravel');
});

Please help me to solve my error... 请帮助我解决我的错误...

only remove semicolon in php.ini file from your php folder of wamp server 只从wamp服务器的php文件夹中删除php.ini文件中的分号

instead of this line in php.ini ;extension=php_openssl.dll you have to write (only remove semicolon) extension=php_openssl.dll 而不是php.ini; extension = php_openssl.dll中的这一行,您必须编写(仅删除分号)extension = php_openssl.dll

after that you have to restart your wamp Now, its work properly.. 之后,您必须立即重新启动Wamp,它可以正常工作。

Thanks. 谢谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 消息:fsockopen():无法连接到ssl://smtp.gmail.com:465(连接超时) - Message: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Connection timed out) AbstractSmtpTransport.php第404行中的Swift_TransportException:与smtp.gmail.com的连接:465超时 - Swift_TransportException in AbstractSmtpTransport.php line 404: Connection to smtp.gmail.com:465 Timed Out 无法在laravel 5.2中与主机smtp.gmail.com建立连接[连接超时#110] - Connection could not be established with host smtp.gmail.com [Connection timed out #110] in laravel 5.2 如何解决:PHP中无法通过主机smtp.gmail.com建立连接[连接超时#110]错误 - How to resolve: Connection could not be established with host smtp.gmail.com [Connection timed out #110] error in PHP 如何解决错误:消息:fsockopen():无法连接到 ssl://smtp.gmail.com:465(连接被拒绝) - How to resolve the error: Message: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Connection refused) PHPMailer错误连接:打开到ssl://smtp.gmail.com:465,timeout = 300,options = array() - PHPMailer error Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array () Connection could not be established with host smtp.gmail.com:stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 - Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 Swift_TransportException无法与主机smtp.gmail.com建立连接[连接超时#110] - Swift_TransportException Connection could not be established with host smtp.gmail.com [Connection timed out #110] Swiftmailer:无法与主机 smtp.gmail.com 建立连接 [连接超时 #110] - Swiftmailer: Connection could not be established with host smtp.gmail.com [Connection timed out #110] Lravel邮件未发送-无法与主机smtp.gmail.com建立连接[连接超时#110] - Lravel Mail not sending — Connection could not be established with host smtp.gmail.com [Connection timed out #110]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM