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

I tested my credentials with https://www.smtper.net/ and they work flawlessly for port 25 (without encryption) and port 465 (with encryption). Maybe there is an error in my Laravel config files:

.env:

MAIL_DRIVER=smtp
MAIL_HOST=###.netcup.net
MAIL_PORT=25
MAIL_USERNAME=me@mydomain.de
MAIL_PASSWORD=#########
MAIL_FROM_ADDRESS=me@mydomain.de
MAIL_FROM_NAME="me"
MAIL_ENCRYPTION=null

我也试过

MAIL_DRIVER=smtp
MAIL_HOST=###.netcup.net
MAIL_PORT=465
MAIL_USERNAME=me@mydomain.de
MAIL_PASSWORD=#########
MAIL_FROM_ADDRESS=me@mydomain.de
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', 'me@mydomain.de'),
        '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 "me@mydomain.de" 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 \"me@mydomain.de\" 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的原始安装中发生的,除了这些配置文件外,没有任何修改。有人有主意吗?谢谢。

评论
  • Ula
    Ula 回复

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

    Less Secure

    我认为您的意思是“允许安全性较低的应用程序”。