Payment Email not sending

Hi,
I’m unable to send Payment emails. Invoices and quotes send alright.

Please see below output from supervisor log:

2024-04-16 11:47:00 App\Jobs\Util\VersionCheck … RUNNING
2024-04-16 11:47:01 App\Jobs\Util\VersionCheck … 485.51ms DONE
2024-04-16 11:50:18 App\Listeners\User\UpdateUserLastLogin … RUNNING
2024-04-16 11:50:18 App\Listeners\User\UpdateUserLastLogin … 49.62ms DONE
2024-04-16 11:50:18 App\Jobs\Util\SystemLogger … RUNNING
2024-04-16 11:50:18 App\Jobs\Util\SystemLogger … 9.61ms DONE
2024-04-16 11:53:00 App\Listeners\User\UpdateUserLastLogin … RUNNING
2024-04-16 11:53:00 App\Listeners\User\UpdateUserLastLogin … 30.66ms DONE
2024-04-16 11:53:00 App\Jobs\Util\SystemLogger … RUNNING
2024-04-16 11:53:00 App\Jobs\Util\SystemLogger … 8.27ms DONE
2024-04-16 11:53:30 App\Services\Email\Email … RUNNING
2024-04-16 11:53:33 App\Listeners\Invoice\InvoiceEmailActivity … RUNNING
2024-04-16 11:53:33 App\Listeners\Invoice\InvoiceEmailActivity 19.48ms DONE
2024-04-16 11:53:36 App\Services\Email\Email … 5s DONE
2024-04-16 11:53:36 App\Listeners\Mail\MailSentListener … RUNNING
2024-04-16 11:53:36 App\Listeners\Mail\MailSentListener … 62.72ms DONE
2024-04-16 11:53:39 App\Listeners\Invoice\InvoiceEmailedNotification RUNNING
2024-04-16 11:53:42 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-16 11:53:42 App\Listeners\Mail\MailSentListener … RUNNING
2024-04-16 11:53:42 App\Listeners\Mail\MailSentListener … 10.29ms DONE
2024-04-16 11:53:43 App\Jobs\Payment\EmailPayment … 485.23ms FAIL
2024-04-16 11:53:43 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-16 11:53:44 App\Jobs\Payment\EmailPayment … 471.35ms FAIL
2024-04-16 11:53:44 App\Listeners\Mail\MailSentListener … RUNNING
2024-04-16 11:53:44 App\Listeners\Mail\MailSentListener … 6.69ms DONE
2024-04-16 11:53:44 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-16 11:53:45 App\Jobs\Payment\EmailPayment … 476.46ms FAIL
2024-04-16 11:53:45 App\Listeners\Invoice\InvoiceEmailedNotification 6s DONE
2024-04-16 11:53:45 App\Listeners\Mail\MailSentListener … RUNNING
2024-04-16 11:53:45 App\Listeners\Mail\MailSentListener … 4.97ms DONE
2024-04-16 11:54:16 App\Listeners\Contact\UpdateContactLastLogin … RUNNING
2024-04-16 11:54:16 App\Listeners\Contact\UpdateContactLastLogin 15.37ms DONE

This is a fairly fresh installation:

  • Invoice Ninja Version - v5.8.48-C157 on Ubuntu 22 VPS

Hi,

Are there any details about the error in storage/logs

@david do you have any suggestions?

In laravel.log,

The below is repeated many times.

production.ERROR: Typed property App\Services\Template\TemplateService::$entity must not be accessed before initialization {“exception”:"[object] (Error(code: 0): Typed property App\Services\Template\TemplateService::$entity must not be accessed before initialization at /app/Services/Template/TemplateService.php:1316)

Thanks, that’s helpful!

@david should be able to provide more help.

@manuel
let us know if this is still happening in .49

Yes @david
Here’s an excerpt from the supervisor log…

2024-04-17 05:30:20 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-17 05:30:20 App\Jobs\Payment\EmailPayment … 474.25ms FAIL
2024-04-17 05:30:20 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-17 05:30:21 App\Jobs\Payment\EmailPayment … 493.33ms FAIL
2024-04-17 05:32:36 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-17 05:32:37 App\Jobs\Payment\EmailPayment … 457.96ms FAIL
2024-04-17 05:32:37 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-17 05:32:38 App\Jobs\Payment\EmailPayment … 513.10ms FAIL
2024-04-17 05:32:38 App\Jobs\Payment\EmailPayment … RUNNING
2024-04-17 05:32:38 App\Jobs\Payment\EmailPayment … 465.10ms FAIL

Same error $entity must not be accessed?

@manuel It would also help to know when in the app you are “sending” the email, is it after creating a payment?

Hello @david Sorry i didn’t respond sooner. I was sending the email after creating a payment.

The issue is resolved in .51