用于密码重置的登录凭据在Laravel 7中不起作用

问题描述 投票:0回答:1

我用https://www.smtper.net/测试了我的凭据,它们可完美地用于端口25(未加密)和端口465(已加密)。我的Laravel配置文件中可能有一个错误:

。env:

MAIL_DRIVER=smtp
MAIL_HOST=###.netcup.net
MAIL_PORT=25
[email protected]
MAIL_PASSWORD=#########
[email protected]
MAIL_FROM_NAME="me"
MAIL_ENCRYPTION=null

我也尝试过

MAIL_DRIVER=smtp
MAIL_HOST=###.netcup.net
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=#########
[email protected]
MAIL_FROM_NAME="me"
MAIL_ENCRYPTION=ssl

config / mail.php:

    'mailers' => [
        'smtp' => [
            'transport' => 'smtp',
            'host' => env('MAIL_HOST', '###.netcup.net'),
            'port' => env('MAIL_PORT', 25),
            'encryption' => env('MAIL_ENCRYPTION', 'null'),
            'username' => env('MAIL_USERNAME'),
            'password' => env('MAIL_PASSWORD'),   
            'timeout' => null,
            'auth_mode' => null,
        ],
    'from' => [
        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
        'name' => env('MAIL_FROM_NAME', 'me'),
    ],

端口25和465这两个请求都在Laravel中带来此错误:

[2020-05-11 12:56:35] local.ERROR: Failed to authenticate on SMTP server with username "[email protected]" using 3 possible authenticators. Authenticator CRAM-MD5 returned Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: authentication failure
". Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: authentication failure
". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: authentication failure
". {"exception":"[object] (Swift_TransportException(code: 0): Failed to authenticate on SMTP server with username \"[email protected]\" using 3 possible authenticators. Authenticator CRAM-MD5 returned Expected response code 235 but got code \"535\", with message \"535 5.7.8 Error: authentication failed: authentication failure
\". Authenticator LOGIN returned Expected response code 235 but got code \"535\", with message \"535 5.7.8 Error: authentication failed: authentication failure
\". Authenticator PLAIN returned Expected response code 235 but got code \"535\", with message \"535 5.7.8 Error: authentication failed: authentication failure
\". at C:\\wamp64\\www\\vanilli\\vendor\\swiftmailer\\swiftmailer\\lib\\classes\\Swift\\Transport\\Esmtp\\AuthHandler.php:191)

此问题在这里发生过几次,但没有一个答案有效。这是在Laravel 7的原始安装中发生的,除了这些配置文件外,没有任何修改。有人有主意吗?谢谢。

laravel authentication swiftmailer
1个回答
0
投票

您必须配置您的电子邮件地址

Less Secure

我认为您的意思是“允许使用不太安全的应用程序。”

© www.soinside.com 2019 - 2024. All rights reserved.