HELP - Can't get email to working

I’m fighting a little bit with getting everything working now that the new year has entered and i have been calling many of my clients (more then would be normal) to remind them to pay us for the last years services or we will close there services -only for them all telling us that they have never received any invoice from us to pay… Then debugging on this I’m now at a point where I’m stuck and don’t know what to look for now or missing.

I’m running v5.8.20-W151 with docker-compose and have set the following ENV in the docker-compose:

MAIL_MAILER=log
MAIL_HOST=domain-tld.mail.protection.outlook.com
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=billing@domain.tld
MAIL_FROM_NAME=billing@domain.tld

FYI: the above SMTP details in the config works (both from our copier/scanners and other containers on the same docker environment).

In the REACT and Flutter is just gives me an success messages with sent/queued but there is not getting anything in the mail-trace when I’m looking on my tenant at Microsoft365 nor is there anything in the laravel.log or invoiceninja.log and my “Systems Log” on the dashboard is empty.

What can I do here ??? cron and queue is not something i need to run in the docker-compose as I’m understanding in the documentation and notes in the compose mentioning that it’s only for v4 the cron service. Or am I’m missing something here?

Hi,

Are there any errors in the system_log table?

Nope only 1 payment gateway failure with GoCardLess that I have made testing that service.

What is QUEUE_CONNECTION set to? It may help to try setting it to sync to disabled the queue.

Hi it’s done all as per the github docker-compose and env file (but added the needed service keys).

but it’s: QUEUE_CONNECTION=database

Are there any pending jobs in the jobs table or errors in the failed_jobs table?

Also, I suggest testing with sync.

Not sure what i see here in the Jobs table but yes there is 742 records in it.

Before testing with sync will it send 700+ mails or do I need to delete the jobs table or how do this work?

It looks like the queue isn’t running, this should work out of the box with the official dockerfile. Changing to sync will correct this but will cause a delay in the app since it will wait to send.

Okay, where is the jobs database table executed from within the database image/service or the ninja image/service of the docker-compose?

Also before changing to sync what will that do (do i need to delete all in the jobs table) because I have resent a lot and don’t what to spam clients :slight_smile:

@david can you please advise?

1 Like

I’m not sure I’m getting where is the service/script/code that is responsible for the job queue in the database?

Would really like to get this fixed as it’s verry slow to use the sync… But also need clients to get there invoices - to get paid…

I believe this is where it’s defined

Hmm okay that was also the files i was look at, is it correct that they are contained/running within the Invoiceninja “app” service of the compose?

Because I can’t seam to get it to execute the queue… have tried to exec into the service and run the following command from the cronjob_v5.sh manual without any lock.

I’m using Maria10.4 and not MySQL8 don’t know it that really should give this issue.

also all jobs have 1 attempt so and no error/failed log - so where to see the result of the 1 init attempt

If the job is failing there should be more info in the failed_jobs table.

Only have 2 “old” jobs in failed_jobs regarding the ziptax so not related.

Deleted smtp settings from .env and setup the smtp withing settings in the Invoiceninja app and then all worked as it should.

1 Like