Emails are not being sent after clean install, despite credentials being correct

After a clean install, the setup screen did not let me pass, unless I selected logs as email method. Then I manually edited the SMTP settings. The same I am using for other mail clients and also for previous installations.
However, emails are not being send. After pressing the button, a couple of minutes later, I just get this error message:

504: <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>

My .env file:

MAIL_MAILER="smtp"
MAIL_HOST="mail.your-server.de"
MAIL_PORT="465"
MAIL_USERNAME="..."
MAIL_PASSWORD="..."
MAIL_ENCRYPTION="null"
MAIL_FROM_ADDRESS="..."
MAIL_FROM_NAME="..."

My cronjobs:

* * * * * php8.1 /usr/share/nginx/invoiceninja/artisan schedule:run >> /dev/null 2>&1

I tested the crontab thoroughly, it is working and the command works standalone

laravel.log doe snot show anything relevant
Please tell me when there is more information needed. Thanks :slight_smile:

Hi,

What is the queue set to in the .env file?

QUEUE_CONNECTION=sync

If that is what you mean

Thanks, correct.

You may want to try using telnet from the CLI to ensure the host/part are reachable from the server.

Also, it may help to test with a different email provider.

1 Like

Tried it using telnet and found out that I was using the wrong port. My mail provider just changed it. Mozilla Thunderbird was still operating with the old port.
Anyway, thank you man

Glad to hear it’s sorted, thanks for the update!