Changing SMTP server

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

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?

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.

That interface is only available when initially setting up

Yes. So the .env overwrites whatever was set on the initial setup web page.

As long as you run php artisan optimize

1 Like

Thank you for the help

Sure! FYI… we plan to add a UI to manage the .env file but it probably won’t be available for some time.

1 Like

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=‘user@example.com’
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

image

Click Heath Check

Then click clear cache