<legend id='cfsI2'><style id='cfsI2'><dir id='cfsI2'><q id='cfsI2'></q></dir></style></legend>
  • <small id='cfsI2'></small><noframes id='cfsI2'>

      <bdo id='cfsI2'></bdo><ul id='cfsI2'></ul>
      <tfoot id='cfsI2'></tfoot>

      1. <i id='cfsI2'><tr id='cfsI2'><dt id='cfsI2'><q id='cfsI2'><span id='cfsI2'><b id='cfsI2'><form id='cfsI2'><ins id='cfsI2'></ins><ul id='cfsI2'></ul><sub id='cfsI2'></sub></form><legend id='cfsI2'></legend><bdo id='cfsI2'><pre id='cfsI2'><center id='cfsI2'></center></pre></bdo></b><th id='cfsI2'></th></span></q></dt></tr></i><div id='cfsI2'><tfoot id='cfsI2'></tfoot><dl id='cfsI2'><fieldset id='cfsI2'></fieldset></dl></div>
      2. Laravel Gmail 配置错误

        时间:2024-08-23

        1. <small id='v65ZY'></small><noframes id='v65ZY'>

            <i id='v65ZY'><tr id='v65ZY'><dt id='v65ZY'><q id='v65ZY'><span id='v65ZY'><b id='v65ZY'><form id='v65ZY'><ins id='v65ZY'></ins><ul id='v65ZY'></ul><sub id='v65ZY'></sub></form><legend id='v65ZY'></legend><bdo id='v65ZY'><pre id='v65ZY'><center id='v65ZY'></center></pre></bdo></b><th id='v65ZY'></th></span></q></dt></tr></i><div id='v65ZY'><tfoot id='v65ZY'></tfoot><dl id='v65ZY'><fieldset id='v65ZY'></fieldset></dl></div>

              <bdo id='v65ZY'></bdo><ul id='v65ZY'></ul>

              <legend id='v65ZY'><style id='v65ZY'><dir id='v65ZY'><q id='v65ZY'></q></dir></style></legend>
              • <tfoot id='v65ZY'></tfoot>
                    <tbody id='v65ZY'></tbody>
                  本文介绍了Laravel Gmail 配置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在使用 Gmail 的 Laravel 电子邮件中遇到了这个问题,我已经检查并审查了 Stack Overflow 上的许多问题,但在我的情况下仍然没有一个问题.我正在使用 Laravel 5.4 和 Xampp.

                  I have been having this issue with Laravel email with Gmail and I have checked and reviewed so many questions on Stack Overflow but none still works in my case. I am using Laravel 5.4 and Xampp.

                  起初我以为是我的 Xampp 无法发送电子邮件,但当我进入实时模式(将其托管在共享主机上)时仍然存在同样的问题

                  At first I thought it was my Xampp that cannot allow sending the emails but also when I move to the live mode(hosted it on a shared hosting) still have same issues there as well

                  但是每当我将配置设置为使用 Mailtrap 时,它就可以工作,而且我知道 mailtap 只是一个开发邮件服务器,但是每当我使用 Gmail 时,它都会给我错误,例如 "Expected response code 220 but got code"", 带有消息 """

                  But whenever I set the configuration to use Mailtrap, it's working and I know mailtap is just a development mail server, but whenever I use the Gmail it give me error such as "Expected response code 220 but got code "", with message """

                  此外,当我在实时模式下尝试时,它仍然会出现同样的错误.

                  Also when I try it on live mode it still gives same error.

                  我的配置文件有以下内容

                  My configuration file has the following

                  .env

                  MAIL_DRIVER=smtp
                  MAIL_HOST=gmail-smtp-msa.l.google.com (also tried smtp.gmail.com)
                  MAIL_PORT=587
                  MAIL_USERNAME=email@gmail.com
                  MAIL_PASSWORD=password
                  MAIL_ENCRYPTION=ssl
                  

                  邮件.php

                  <?php
                  
                  return [
                  
                  
                      'driver' => env('MAIL_DRIVER', 'smtp'),
                  
                      'host' => env('MAIL_HOST', 'gmail-smtp-msa.l.google.com'),
                  
                  
                      'port' => env('MAIL_PORT', 587),
                  
                      'from' => [
                          'address' => 'email@gmail.com',
                          'name' => 'Name Here',
                      ],
                  
                      'encryption' => env('MAIL_ENCRYPTION', 'tls'),
                  
                       'username' => env('MAIL_USERNAME', 'email@gmail.com'),
                  
                      'password' => env('MAIL_PASSWORD', 'password'),
                  
                  
                  
                      'sendmail' => '/usr/sbin/sendmail -bs',
                      'markdown' => [
                          'theme' => 'default',
                  
                          'paths' => [
                              resource_path('views/vendor/mail'),
                          ],
                      ],
                  
                  ];
                  

                  推荐答案

                  除了Laravel端的配置,还需要在您的 Gmail 帐户中启用不太安全的应用".

                  As well as the configuration on the Laravel side, you need to enable "Less secure apps" in your Gmail account.

                  在 Laravel 方面,本指南显示了您的设置需要.使用 smtp.gmail.com 作为主机,使用 465/ssl587/tls.

                  On the Laravel side, this guide shows the settings you need. Use smtp.gmail.com for host, and either 465/ssl or 587/tls.

                  这篇关于Laravel Gmail 配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:将 PHPMailer 用于 SMTP 的问题 下一篇:mediatemple - 无法使用 codeigniter 发送电子邮件

                  相关文章

                • <small id='c5Bai'></small><noframes id='c5Bai'>

                      <bdo id='c5Bai'></bdo><ul id='c5Bai'></ul>

                  1. <legend id='c5Bai'><style id='c5Bai'><dir id='c5Bai'><q id='c5Bai'></q></dir></style></legend>
                  2. <tfoot id='c5Bai'></tfoot>

                      <i id='c5Bai'><tr id='c5Bai'><dt id='c5Bai'><q id='c5Bai'><span id='c5Bai'><b id='c5Bai'><form id='c5Bai'><ins id='c5Bai'></ins><ul id='c5Bai'></ul><sub id='c5Bai'></sub></form><legend id='c5Bai'></legend><bdo id='c5Bai'><pre id='c5Bai'><center id='c5Bai'></center></pre></bdo></b><th id='c5Bai'></th></span></q></dt></tr></i><div id='c5Bai'><tfoot id='c5Bai'></tfoot><dl id='c5Bai'><fieldset id='c5Bai'></fieldset></dl></div>