Custom Email Domain per Company

How can I have individual SMTP settings per company? At the moment all my companies send using my main companies email domain. I would like this to be on a per company basis.

Hi,

I don’t believe this is currently supported.

Is this something you guys would consider? It makes no sense for company two to have emails coming from company one which is completely unrelated. It also undermines the security of the emails delivered from a trustworthiness perspective

@david is this on the backlog?

I’ve done this for the next release, an important note, this only works if the configuration is NOT cached.

I would assume when the system updates and runs its usual configuration caching that the default mailer will be used until the user runs:

php artisan config:cache
php artisan config:clear

Thats cool! Look forward to testing this.

How does this work in practice, is it configured via UI or in the .env?

@AltF4

It will work the same as V4

You will need to prefix your .env with the primary key of the company ie 1

1_MAIL_HOST=
1_MAIL_PORT=
1_MAIL_USERNAME=null
1_MAIL_PASSWORD=null
1_MAIL_ENCRYPTION=null

And for these configuration, always ensure your cache is never optimized, you’ll want to run:

php artisan config:cache
php artisan config:clear