My Invoice Ninja not send Emails

I am trying to send the invoices to my customers but first I am checking with a demo customer if the mails arrive, unfortunately they are not arriving and I am not able to deliver the invoices to the customers.

I have configured it in the .env file like this:

MAIL_MAILER=“smtp”
MAIL_HOST=“smtp.gmail.com
MAIL_PORT=“587”
MAIL_USERNAME=“pagos@un2.es”
MAIL_PASSWORD=“password hidden for security”
MAIL_ENCRYPTION=“tls”
MAIL_FROM_ADDRESS=“pagos@un2.es”
MAIL_FROM_NAME=“UN2_Facturacion”

I don’t know if you can tell me where the error is because I can’t get it to work.

Best regards

Hi,

Are you seeing any errors in storage/logs or the system logs in the app?

I don’t see any error and when I send the invoice it tells me that it was sent correctly however it doesn’t reach the destination

Have you seen the info here:

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

Hello,

I don’t know what you mean by the queue in .env,I have set everything as it is on the help page,I have enabled smtp senders in Google Workspaces and added the IP addresses to the Google Workspace whitelist however,Invoice Ninja tells me " the email was sent successfully" but it doesn’t reach the final email where the invoice should arrive.

What is QUEUE_CONNECTION set to in the .env file?

QUEUE_CONNECTION:database

That means the queue is enabled. To start I suggest changing it to sync to disable the queue. If it works without the queue there’s info here to enable it.

I have tried both ways, setting it to Sync and setting it to database, both ways the email still doesn’t arrive.

When it’s set to sync are there any errors in storage/logs or in the system logs?

I don’t see any error in the file you mention, I don’t know what could be wrong because I have done all the configuration following the steps in the faqs of the web and it still doesn’t work.

Do you know how to check the system logs?

I have looked in the folder where the logs are hosted on the ftp server, where can I see the system logs?

In the app on the dashboard there is a ‘System logs’ tab.

The system log shows me that there was a failure to send the email yesterday, but today after reconfiguring everything there is no error.

However, a very strange error appears and I don’t know how to solve it because the php version is the correct one.

Good afternoon, it seems that my cron is disabled, could you tell me how I can enable it so that everything works?

What do you see if you run php -v

The app requires the CLI PHP version to be >= 8