Recurring Invoice - Client email not sent

Hi,

I have set up a test recurring invoice to recur daily. The invoices get created daily fine and I receive a ‘sent’ receipt email to my admin mail box, but the client email is not actually sent. If i manually send the email though that sends fine. How come the receipt email can be sent but the client’s one can’t when it recurs? Any idea what this could be?

I have the queue set to ‘sync’.
v5.3.54-C75


I did have this set to ‘database’ to enable the queue which worked for a day but turned out my host frustratingly resets my cron timings every night to around 20-25 minutes instead of the desired 1 minute! So this wasn’t really working when set to ‘database’. As I receive the receipt emails on-time and consistently I can’t see how this could be the cause when on sync though. I’m sure I had it working fine though until about 2 weeks ago when ALL emails decided to stop apart from the admin ones. Not sure what happened there but managed to get that working again somehow.

Many thanks.

Hi,

@david do you have any ideas?

@carter-hosting

Does the system attempt to send the invoice to the client but fail? Or is no attempt made at all?

In Settings > Workflow settings. Is the email set to auto send?

@david Auto Email is enabled

And the ‘Activity’ for the generated invoice says it was sent by ‘System’ so I assume it tried? But it also doesn’t say it failed.

But only seems to work when i manually send:

@david any ideas?

Many thanks

@carter-hosting on the dashboard, there is a System logs tab. Is there any info in there regarding delivery?

@david Nope, no system logs relating to anything recent :confused:

@carter-hosting

I’m stumped. I’m not sure why you are selectively getting the emails, but the client is not.

When you click on the recurring invoice, is the checkbox next to the contacts name ticked?

@david
Client is checked, and the client does receive an email, but ONLY if I manually send it :confused:

Please see the recurring invoice settings below:

One thing I have just noticed is the ‘User’ field which I do not have set in the Invoice settings at the bottom. Could this be it? I’m not too sure what the purpose of a ‘User’ is to an invoice… I will try set this and see if thats it. Don’t see why it should be though… I want invoices just sent from and by ‘the company’, not tied to a ‘user’ (its just me anyways).

@carter-hosting

The user field is if you wish to assign the recurring invoice to another user in your team.

In Settings > Workflow settings is auto email on?

@david
Ah ok thats fair.I did try it anyways but made no difference. Still only received the ‘email was sent to client’ email, but still no actual client email sent.

Auto-email is enabled in workflow settings

@david
Any other ideas?

@carter-hosting

I’m stumped, we’ve gone through everything I can think of. I’ll keep having a think on this.

@david
Any more thoughts?

Is there any debugging which can be enabled/code I can add to any files which which would help narrow down what the cause is?

Thanks

@carter-hosting

Nothing I can think of unfortunately. One thing to confirm would be to ensure the send_email column of the client_contacts table is set to TRUE / 1

@david

Looks like send_email is enabled (set to 1) for all client_contacts so not that unfortunately.

Would temporarily adding you as a user be an option to see if you can see anything that might be wrong? Or sending you a screenshot of the .env file?

Many thanks

@david
Any more help/suggestions would be appreciated

@carter-hosting

Can you check the failed-jobs table in the database if There are any failed jobs for EmailEntity or other jobs with references to email.

@david
I have the queue:sync set so don’t think it uses the ‘jobs’ if i understand it correctly?

The failed_jobs table is empty so nothing to debug there unfortunately. I did try the queue set to database previously but ran into similar issues. I assumed it was because I could not set the cron jobs to the timings in the docs due to host limitations (minimum was around 20-40 minutes rather than every 5). I don’t think that is the issue though as invoices are created the right time and I receive the email stating it was created, just seems there something wrong with it generating or sending the email to the client? Strange it was working at one point, but just stopped and can’t pinpoint at what point it stopped. Should I try the jobs queue database again?

can you inspect the client_contacts table and ensure that the deleted_at column does not have dates for email addresses which should be working as expected?