Hi guys
So, I’ve setup invoiceninja v5 (dockerized), and entered the email server settings on the initial setup page.
I need to change the email server (SMTP) settings, however I can’t seem to find the option within the web interface.
Is there an option in the web interface or do I have to change/update it elsewhere?
Thanks
hillel
April 9, 2021, 6:25am
2
Hi,
You need to edit the .env file and then run php artisan optimize
.
Does that mean the .env settings will override the mail server setting configured through the web interface?
hillel
April 9, 2021, 6:48am
4
I don’t understand, in v5 it isn’t possible to configure the email server through the web interface.
When setting up v5 for the first time, it let’s you configure the email server for InvoiceNinja to use.
hillel
April 9, 2021, 7:05am
6
That interface is only available when initially setting up
Yes. So the .env overwrites whatever was set on the initial setup web page.
hillel
April 9, 2021, 7:12am
8
As long as you run php artisan optimize
1 Like
hillel
April 9, 2021, 7:26am
10
Sure! FYI… we plan to add a UI to manage the .env file but it probably won’t be available for some time.
2 Likes
I edited the .env file that is located in the root of your INv5 install path.
Here are some example mail settings
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=‘[email protected] ’
MAIL_FROM_NAME=‘Self Hosted User’
You must include the ‘’ in mail_from_address and mail_from_name otherwise Invoice Ninja breaks.
Once you have updated the .env file
Log into Invoice Ninja
Bottom left of your screen click the info icon
Click Heath Check
Then click clear cache
1 Like
What happens if you can’t run the command due to being on shared hosting?
I am on shared hosting and managed to run the command as a Cron job, set to run every minute then I deleted it once it had the chance to run at at least once. I used the following format:-
cd /home/???/???e.co.uk && /opt/alt/php74/usr/bin/php -d register_argc_argv=On artisan optimize >> /dev/null 2>&1
It worked for me.