Mail config for Laravel over RoundCube
Asked Answered
D

1

0

I am using Laravel to send out some emails from RoundCube. The trouble is that I keep getting the same error

Failed to authenticate on SMTP server with username "[email protected]" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 250 but got code "530", with message "530 5.7.1 Client was not authenticated
 ". Authenticator PLAIN returned Expected response code 250 but got code "530", with message "530 5.7.1 Client was not authenticated.

I have looked around and havent found an accurate answer for that. Here is a part of the .env file that is relevant to the problem at hand.

MAIL_DRIVER=smtp
MAIL_HOST=ssl0.ovh.net
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=somepassword
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

I tried to replace the MAIL_ENCRYPTION and MAIL_PORT with tls and 587 respectively. Also, I made sure that the credentials actually work. I also looked at the ovh docs which were not helpful at all for sending mails. Also, there is no option to allow less secure accounts like in Gmail.

Thanks

Dianadiandra answered 10/11, 2020 at 22:8 Comment(1)
Do you have a hosting account from OVH that includes an MX plan? This is necessary. Also try smtp.mail.ovh.ca instead.Offering
M
-1

First remove all mail configuration from .env file stated with MAIL_

Then open your mail.php from config folder and create a new array under smtp.

'gmail' => [
        'transport' => 'smtp',
        'host' => 'smtp.gmail.com',
        'port' => 465,
        'encryption' => 'ssl',
        'username' => '[email protected]',
        'password' => 'xxigefvqehfypdmg',
    ],

then mention it in your default mailer

'default' => env('MAIL_MAILER', 'gmail'),

run these commnands

php artisan config:clear

and

compser dump-autoload

then

php artisan serve

hope will solve your problem.

Metacarpal answered 11/11, 2020 at 8:48 Comment(2)
Thanks Hassan, I did try your suggestion and used the settings of OVH, but Im still getting the same error.Dianadiandra
Can you please share your current system config, laravel installation config and your mail.php configMetacarpal

© 2022 - 2024 — McMap. All rights reserved.