Self-hosted Ubuntu 20.04 SMTP Error: Expected response code "250"

Migrate to Self-hosted Ubuntu server, cannot send emails.

Here is the error message.
[2023-04-23 06:05:52] production.ERROR: Expected response code “250” but got code “530”, with message “530 Error: authentication Required”. {“userId”:1,“exception”:"[object] (Symfony\Component\Mailer\Exception\TransportException(code: 530): Expected response code "250" but got code "530", with message "530 Error: a

uthentication Required". at /home/invoicexx/Invoice/public_html/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php:337)

[stacktrace]

#0 /home/invoice3yZD2DWVaV/Invoice/public_html/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(201): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->assertResponseCode()

#1 /home/invoice3yZD2DWVaV/Invoice/public_html/vendor/symfony/mailer/Transport/Smtp/EsmtpTransport.php(105): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->executeCommand()

#2 /home/invoice3yZD2DWVaV/Invoice/public_html/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(258): Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport->executeCommand()

The smtp credential in .env is correct for sure.
MAIL_MAILER=“smtp”
MAIL_HOST=“smtp-relay.sendinblue.com
MAIL_PORT=“587”
MAIL_USERNAME=“correct username”
MAIL_PASSWORD=“correct password”
MAIL_ENCRYPTION=“tls”
MAIL_FROM_ADDRESS="info@xxx.com"
MAIL_FROM_NAME=“xxx Inc”

Hi,

If you’ve changed the .env file without refreshing the cache it may help to load /update?secret=

did run following commands after change.
php artisan optimize
php artisan cache:clear
php artisan route:clear

restarted the server, still the same error.
Thanks.

Try running: php artisan config:clear

Note: we recommend using the /update route as it should handle all caches

done that. the same error.

@david do you have any suggestions?

it looks like the app is reaching the mail server, however 530 indicates an issue with authentication.