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’.
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.
@david do you have any ideas?
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:
@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
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?
Client is checked, and the client does receive an email, but ONLY if I manually send it
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).
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?
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
I’m stumped, we’ve gone through everything I can think of. I’ll keep having a think on this.
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?
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
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?
Any more help/suggestions would be appreciated
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.
I have the
queue:sync set so don’t think it uses the ‘jobs’ if i understand it correctly?
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?