I followed this post to setup doctor multisites.
but how to configure different smtp email settings for different sites?
The discussion revolves around configuring separate SMTP email settings for different sites in a multisite Discourse installation. suanfazu and 5minpause initially struggled to achieve this, and sam confirmed that multisite installations currently don’t support multiple outgoing SMTP servers.
However, sam expressed willingness to consider a pull request for this feature, suggesting that email settings should be in site settings with the option to be shadowed by globals.
SimonBiggs explored the possibility of funding the implementation of this feature, but later discovered that the desired effect could be achieved by not setting the DISCOURSE_NOTIFICATION_EMAIL environment variable, allowing site-specific email settings to be configured.
silverdr proposed the details of the changes that could be implemented, including the possibility to override all SMTP configuration variables per site or, at a minimum, override the SMTP user name and password per site.
I followed this post to setup doctor multisites.
but how to configure different smtp email settings for different sites?
I tried this as well and couldn’t get the second site to use different settings from the first site.
Perhaps @sam could offer an opinion, if this is a known bug or something else.
We don’t support multiple outgoing SMTP servers in multisite
Thanks for the answer. Is this something you would consider given a pull request? Does it make sense to invest time in?
Sure, if you can pull it off, its pretty complicated, but I would be open to have a PR for it and would kind of prefer if email settings were in site settings as long as they can be shadowed by globals.
Hi @sam,
Might there be potential for some funding if I were to implement this feature? We’re currently looking into getting an MVP grant from our government (MVP Ventures 2023-2024 | NSW Government) and any funding you provide we would be able to get the government to $1 for $1 match it, which would be amazing
.
Cheers,
Simon
Can you specify in detail all the changes being proposed?
Hi @sam,
I actually just realised, that if I choose to not set the following environment variable:
DISCOURSE_NOTIFICATION_EMAIL
Within the app.yml, then the following configuration item appears within settings:
And I can use that to have exactly the effect I desired.
Thanks @sam for having been open to the potential of this
, but looks like won’t be needing a PR this time round.
Maximum / best:
DISCOURSE_SMTP_ADDRESSDISCOURSE_SMTP_PORTDISCOURSE_SMTP_USER_NAMEDISCOURSE_SMTP_PASSWORDDISCOURSE_SMTP_ENABLE_START_TLSDISCOURSE_SMTP_DOMAINMinimum:
DISCOURSE_SMTP_USER_NAMEDISCOURSE_SMTP_PASSWORDin their config/multisite.yml equivalents
Background for minimum: given no other choices I can set things up to live with one SMTP server but surely need separate SMTP users (senders). Sending mail from address in a different domain than the discourse site runs on looks unfortunately like a deal breaker