我知道这个问题已经被问过很多次了,但是我尝试了很多这样的解决方案,但是都没有成功。
您好,我无法通过laravel向laravel发送邮件,但是在使用ssl将网站迁移到其他服务器后,现在出现了以下错误提示。
Expected response code 220 but got code \"\", with message \"\"
以下是用于.end
和mail.php
的代码
.env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=myemail@gmail.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
mail.php
<?php
return [
'driver' => env('MAIL_DRIVER'),
'host' => env('MAIL_HOST'),
'port' => env('MAIL_PORT'),
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'developer.eww@gmail.com'),
'name' => env('MAIL_FROM_NAME', 'GBAN'),
],
'encryption' => env('MAIL_ENCRYPTION','tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/lib/sendmail -i -t',
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];