"500: Server Error" when sending email after update to v5.3.88-C84

After update to the latest version v5.3.88-C84 Invoiceninja cannot send emails. The popup shows “Error. 500: Server Error” and email is not sent.
laravel.log shows:
production.ERROR: Undefined variable $task_ids {"userId":1,"exception":"[object] (ErrorException(code: 0): Undefined variable $task_ids at /invoiceninja/app/Mail/Engine/InvoiceEmailEngine.php:185)

Any help would be appreciated. Thank you.


@david any thoughts?

After looking at InvoiceEmailEngine.php:185 it seems it has to do with Documents attachments.
So if you have “Attach Documents” enabled in Email Settings, sending of emails will fail. So for now workaround is to disable this option.

1 Like


I have a fix for this in the next release, if you need to patch prior this is the fix

                $task_ids = [];

                if(property_exists($item, 'task_id'))
                    $task_ids[] = $item->task_id;

1 Like