500 Error and site fails to load after change to .env

When I originally setup V5, I didnt have my email setup to be able to send from that server, and the only way I could move past that was to choose “log” as the MAIL_MAILER=log in the .env.

I now believe I have the SMTP setup, but when I changed the MAIL_MAILER=smtp and then set the remaining settings for email, it completely broke the invoice ninja site. The site would not load at all, and if I had a window already open and tried to make any changes, I got a 500 error saying “Make sure Invoice Ninja V5 is installed on this host”.

This makes no sense to me why changing the email settings in the .env would completely hose the site.

So my question is, how can I change this to test me email and why would a simple change to just the email portion of the .env break the entire site. As soon as I removed the settings and put the MAIL_MAILER back to “log” the site would again load and work just fine. So until I can fix this, I am unable to send any emails / invoices etc.

Would love some help here as I don’t even know where to begin.

it appears that I did not add quotes around the variables that I changed. While none of the other variables have quotes, that was the solution that the developers suggested and it fixed the problem. So I would guess if you change or add variables in the .env file, you need to wrap everything after the = in quotes, and the issue will go away. Cheers!

If the value has spaces in it it requires quotes