Laravel 邮件程序:Swift_TransportException 身份验证模式 1 无效

我将我的站点迁移到另一个托管站点,并且自迁移后此错误开始发生。我正在使用 Laravel 8.31.0,我正在尝试向我网站上的用户发送电子邮件,但在发送“Swift_TransportException”时收到此错误响应 身份验证模式 1 无效”。请注意,在迁移之前,它在我以前的托管站点上运行良好。

我已经联系了我的托管站点的开发团队,他们推荐了一些我尝试过但仍然无效的修复程序,我也在这里看到了一些修复程序,我已经尝试过,但仍然没有工作,请问我该如何解决这个问题?我是 Laravel 的新手 这是我的 .env 文件的样子:

APP_NAME="NeoExchange"
APP_ENV=local
APP_KEY=base64:pGwNRHBYg+/GuUZ6N9GSfb+cFrCED+0t0yjl+E7OI0g=
APP_DEBUG=true
APP_URL=https://neoexchange.org
LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=u387898564_neoexchange
DB_username=u387898564_neoexchange
DB_PASSWORD=********

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=database
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=smtp.titan.email
MAIL_PORT=465
MAIL_username=support@neoexchange.org
MAIL_PASSWORD=********
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=support@neoexchange.org
MAIL_FROM_NAME="${APP_NAME}"

AWS_accESS_KEY_ID=
AWS_SECRET_accESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

PAYSTACK_PUBLIC_KEY=
PAYSTACK_SECRET_KEY=
PAYSTACK_PAYMENT_URL=
MERCHANT_EMAIL=

NOCAPTCHA_SECRET=6Lf4QEobAAAAAPUndWuzgsn5FhrTT4KWUOf9RdZg
NOCAPTCHA_SITEKEY=6Lf4QEobAAAAANwg6v8STXeh83DXV0lwS8iI8uYb

这是我的mail.php文件:

<?php

返回[

/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send any email
| messages sent by your application. Alternative mailers may be setup
| and used as needed; however,this mailer will be used by default.
|
*/

'default' => env('MAIL_MAILER','smtp'),/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp","sendmail","mailgun","ses",|            "postmark","log","array"
|
*/

'mailers' => [
    'smtp' => [
        'transport' => 'smtp','host' => env('MAIL_HOST','smtp.titan.email'),'port' => env('MAIL_PORT',465),'encryption' => env('MAIL_ENCRYPTION','ssl'),'username' => env('MAIL_username'),'password' => env('MAIL_PASSWORD'),'timeout' => null,'auth_mode' => true,],'ses' => [
        'transport' => 'ses','mailgun' => [
        'transport' => 'mailgun','postmark' => [
        'transport' => 'postmark','sendmail' => [
        'transport' => 'sendmail','path' => '/usr/sbin/sendmail -bs','log' => [
        'transport' => 'log','channel' => env('MAIL_LOG_CHANNEL'),'array' => [
        'transport' => 'array',/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here,you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/

'from' => [
    'address' => env('MAIL_FROM_ADDRESS','support@neoexchange.com'),'name' => env('MAIL_FROM_NAME','NeoExcahange'),/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering,you may configure your
| theme and component paths here,allowing you to customize the design
| of the emails. Or,you may simply stick with the Laravel defaults!
|
*/

'markdown' => [
    'theme' => 'default','paths' => [
        resource_path('views/vendor/mail'),

此外,我在编辑我的 .env 文件后确实使用了“php artisan config:cache”,因此它绝对不是缓存问题

anyang394375278 回答:Laravel 邮件程序:Swift_TransportException 身份验证模式 1 无效

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3057.html

大家都在问