Email Settings for Self-Hosted V5

Moved from Hosted to Self-Hosted V5.7.33 and I need to know where to go to tell this to use the host’s outgoing email to send invoices/etc.

Email Provider is set to Default and I tested this today but no emails were received.

Kermit

Hi,

The email credentials can be configured in the .env file.

Thanks! There were some problems with the .ENV settings and I think I fixed them. I’ll report back after more testing.

…and it still doesn’t work. Can you see anything wrong with these settings in .ENV?

MAIL_MAILER=smtp
MAIL_HOST=“smtp.titan.email”
MAIL_PORT=587
MAIL_USERNAME="kermit@woodalldesign.net"
MAIL_PASSWORD=“*************”
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="kermit.woodall@gmail.com"
MAIL_FROM_NAME=“Kermit Woodall”

There may be more details about the email error in the system logs in the app.

There are no new messages in the System Logs at all.

Have you checked both storage/logs and system logs on the app dashboard?

The only log I can find is laravel.log and it appears to have copies of the emails I sent to test. I can’t find any errors listed in here.

Are more emails added to the log when sending additional tests?

Is there anything in the system logs tab on the dashboard?

I don’t think it’s adding new emails to this log file. There is still nothing in the system log in dashboard.

Confirmed. It’s not adding new emails to laravel.log.

Do you see the correct mail driver in the health check?

Here’s the health check. It looks correct except the last two items.

@david do you have any suggestions?

Anything more on this yet? I’ve been trying this and that but ended up back where we left off.

Unsure, however if you turn on in your .env

EXPANDED_LOGGING=true

Any transport errors will appear in storage/logsl/invoiceninja.log

in the next release, i also have a console command

php artisan ninja:send-test-emails

which will give direct feedback on transport issues.

I’m testing with a fresh install of IN now. I added this to .ENV

EXPANDED_LOGGING=true

MAIL_MAILER=“smtp”
MAIL_HOST=“smtp-relay.brevo.com
MAIL_PORT=“587”
MAIL_USERNAME="kermit.woodall+brevo@gmail.com"
MAIL_PASSWORD=“******************”
MAIL_ENCRYPTION=“ssl”
MAIL_FROM_ADDRESS="kermit.woodall@gmail.com"
MAIL_FROM_NAME=“Kermit Woodall”

Since I know my Brevo SMTP does work.

And it works. I then added it to the original install of IN where I’d imported my data from the previous HOSTED version of IN and it doesn’t work.

I then fixed it by copying over the fresh install files and then edited .ENV to use the correct URL and database and now it all works!

Thanks for your help!

1 Like