Invoice emails stopped working

Sending invoices has stopped working, I can send a test email no problem. Currently using postmark as an smtp service but have tried a few other servers but with the same result. I have upgraded the os to the latest version and have upgraded invoice ninja to 4.5.23 only after the issue started but the email issue is still there. Im not sure where to look next to try and correct the issue, any help appreciated. Thanks


Any idea about what changed?

Unfortunately no , nothing has changed to my knowledge. it is strange how the test email works fine but when i try to send an invoice it shows as being sent successfully but it dosnt hit the postmark server and when you check the history of the invioce it is marked as never being emailed. Thanks for your help

Are you using a Postmark API token?

No , I have it setup as SMTP

You may want to see if using an API token helps

ok thanks , so is that the only addition needed to the .env file as I dont see it in the file I only see my current smtp mail details at the end of the file . thanks

Yes, that is correct

Hi thanks for that, when i add the line to .env with my postmark api and try to send an email i get an error “There was an error saving your invoice” Internal Server Error .

Are there any details about the error in storage/logs/laravel-error.log

Below is the error Im seeing in the log when i set the API for postmark in .env

production.ERROR: InvalidArgumentException [0] : /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php [Line 137] => View [emails.design_html] not found. {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“IT Xpress”,“met
hod”:“PUT”,“user_agent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0”,“locale”:“en”,“ip”:“”,“count”:4,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“invoices/146”} []

Sorry, I’m not sure. I wouldn’t expect setting the Postmark API to cause this error.

Ok Thanks for your help, Im also seeing this below the client email when i open the invoice. When I mouse over the red error it also shows “View [emails.design_html] not found.” I can click view in portal and the invoice displays correctly.

  • Which version did you upgrade from?
  • What do you see if you load /update

I had this issue before i upgraded, i thought maybe the upgrade might correct the issue i was using 4.5.17 i think it was. do you think if i upgrade to version 5 it correct the issue ?

What do you see if you load /update

You may be seeing the error from a failed past update, hard to say what other problems there may be.

when i load /update i get 504 gateway timeout.

The link may be /public/update. My guess is a past upgrade didn’t properly complete which is causing the error. Are you able to SSH into the server?

I also tried /public/update and got page not found error. yes i have access to the server

After making a backup of your database try running php artisan migrate, there may be database migrations which need to be run