Error when emailing invoice

chmod 777 the folder /upload/ and see what happens.

What is your invoice’s guest URL? (It should be something like /guest/view/invoice/x317FgzjBiPR8EI)

I’ve changed the /upload folder permissions. and tested… didn’t resolve the issue

here is the guest url


I notice something really weird. The pdf invoice/quote file that i generated is placed in the temp folder and not in the /temp/mpdf folder

does that have anything to do with it?

BTW… thanks MUSA for trying to help…

Does anyone have a possible solution to this problem? I am still stuck… Thanks


Are you customising your e-mail template with HTML? Does it include <head> statements? Have you copy/pasted the “HTML” source from a rich HTML editor and added Invoiceplane tags?

If so, try creating a non-HTML template to test, and slowly add in <body> type elements if it works. Don’t include any <head> or <body> statements (or their associated closing tags). Start simple…

Everything was standard. i didn’t add anything or create anything extra. it was straight out of the box install. Just can’t figure out what is causing it to occur.

Can you go to that page and download your pdf from there?

it gives me an error when i go to it.

An Error Was Encountered

Unable to load the requested file: quote_templates/public/.php

This error occurs if you set a pdf template in the past and it’s not available anymore, likely after a major update for InvoicePlane.
Please check your settings and set all PDF templates correctly.

go to /settings, then click on tab Quotes, scroll down and make sure you selected a PDF template.
If you can’t select any PDF template, it means you’re missing a file within folder /application/views/quote_templates/pdf

@musa, Should this not be looking for **/template_name.php"?

@beachlifemarketing , Do you receive any errors on page two of https://yourdomain/path/index.php/setup/prerequisites/ ? (you may need to re-enable access to setup within the ipconfig.php file - DISABLE_SETUP=true. Do you know much about your hosting environment?


The InvoicePlane app scans the /pdf directory for .php files and prints them in a select box on the settings page.
Either the template (php file) was deleted, which I very doubt, either OP played with the invoices templates settings and set the default template to “nothing” instead of “InvoicePlane” or “InvoicePlane - Paid” or “InvoicePlane - Overdue” or whatever it’s called I can’t remember.
Hence the empty setting value in OP’s db.
You can easily reproduce OP’s bug switching the default invoice PDF template to “none” then try to download it from the guest page.

Yes, that’s what I was getting at. I missed your bit saying, essentially, the same thing. :slight_smile:

New Invoice Plane user here! Love it. Successfully installed it yesterday (after struggling with some SMTP settings due to G-Suite/2-factor authentication/App-specific password).

I too ran into similar issues as the first one, but mine are when I email a Quote. But the error messages I receive are almost identical to the first post in this thread. Specifically:

A PHP Error was encountered

Severity: Warning

Message: unlink(/ Is a directory

Filename: helpers/mpdf_helper.php

Line Number: 117


File: /
Line: 117
Function: unlink

File: /
Line: 254
Function: pdf_create

File: /
Line: 92
Function: generate_quote_pdf

File: /
Line: 208
Function: email_quote

File: /
Line: 327
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /

Filename: helpers/url_helper.php

Line Number: 564


File: /
Line: 213
Function: redirect

File: /
Line: 327
Function: require_once

Any thoughts? I haven’t done any modifications to templates or anything. Note: the emails do indeed send.


I now added an issue for that, seems to be a more common problem.

Kovah, thanks for adding it into the developer portal.

Musa: I’ve taken your suggestions and applied it… But it was not successful. Still receiving the same error.

@Kovah Having read through some other threads on this same issue, I think it may have to do with badly formed HTML in the email. I tried to make the HTML fairly strict (paragraph marks surrounding text) and it worked fine. But when I think I had empty paragraph tags (with nothing in between the open and close tags), it seemed to through that error. Might be worth testing that scenario.

Same problem here, appeared when i updated to the latest 1.5.4 (from 1.5.3 version).
I’m new to Invoiceplain and i love it, installed it just a week ago and it was running smoothly but now this happened. Checked what people above suggest but it doesn’t seem to help. Any help much appreciated.