Hi David, for those of us who have no idea whether we are using phantomJS or not and don’t even know what that means, but are still having this issue with the emails not sending when attach PDF is checked, could you tell us what we should change to PDF_GENERATOR=hosted_ninja and where we would find that? It happens when I set up a Zap in Zapier. Is it something I’d change in the Zap?
What are you hosting your instance of Invoice Ninja on? Are you using cPanel?
If so in your public_html directory you will find a .env file. In this file you will find which PDF generator you are using (line 49).
If you are using Linux then proceed with Randy’s guide.
If you are using the hosted version of Invoice Ninja, then contact their support team directly.
This is puzzling, I’ve tested locally and cannot recreate this. Can you advise your mailing configuration please?
One thing to try for those that are suffering with this issue, in the .env file please change
MAIL_MAILER=log
then reoptimize your cache (php artisan optimize) or delete the contents of bootstrap/cache/
Then reattempt to send an email.
If you then open the log file in storage/logs/laravel.log
The contents of the email - included the PDF - will be dumped to this file, if you are seeing the PDF inside this file it means the system is correctly attaching the PDFs to the emails - so there may be something within the mail server that is removing the attachments?
Once we have this information we’ll be able to move forward with debugging.
so i did the change but i dont see any confirming info
[2022-01-19 15:00:07] production.ERROR: Unable to create lockable file: /var/www/html/ninja/storage/framework/cache/data/db/d3/dbd349546ec3e87e258c52bb7fdd97a0c336dcdb. Please ensure you have permission to create files in this >
[stacktrace]
i checked our permissions
/var/www/html/ninja/storage/framework# ls -l
total 16
drwxrwxrwx 3 www-data www-data 4096 Dec 29 13:41 cache
drwxrwxrwx 2 www-data www-data 4096 Jan 19 12:35 sessions
drwxrwxrwx 2 www-data www-data 4096 Dec 27 15:00 testing
drwxrwxrwx 2 www-data www-data 4096 Jan 19 12:35 views
i orignally had several folders /ninja/storage /ninja/public/storage and server files in /var/www/html/ninja/bootstrap/cache that were showing root root
i adjusted all the folders to www-data that seems to of fixed using MAIL_MAILER=“log”
it will now process the email via the log . but when i change to hosted_ninja it still fails . i am not seeing any logs .
i can send a email to smtp2go.com with not issues unless i add the PDF