@snapey Hey... any idea what's wrong here?
'smtp' => [
'transport' => 'smtp',
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 465,
'encryption' => 'ssl',
'username' => <username>,
'password' => <pass>,
'timeout' => null,
'auth_mode' => null,
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
'options' => [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
'security_level' => 0,
'peer_name' => 'smtp.gmail.com'
]
],
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=ssl
running these on cPanel terminal:
$ php artisan tinker
Psy Shell v0.12.7 (PHP 8.2.25 — cli) by Justin Hileman
Mail::raw('Test email', function($message) { $message->to('[email protected]')->subject('Test'); });
Symfony\Component\Mailer\Exception\TransportException Failed to authenticate on SMTP server with username "[email protected]" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 Incorrect authentication data".".
Note: I've got the 16-digit app password for the email address and use it without any spaces in the config>mail file
P.S. excuse the messy format...