You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the SMTP settings functionality that allows a user to load SMTP settings from the database. This way people are able to dynamically configure the sending mail server for their Intercity instance.
In case of the "from email" setting, this is currently nog working properly. The setting is loaded at the class level in ApplicationMailer, which only gets loaded when the app or sidekiq worker starts up. This is a problem for first-use users, that have a blank from email setting when the Sidekiq service it started on the first run. Because of the class-level code, the email from setting is never updated, unless you restart the running Sidekiq service or full Intercity container.
This is the conflicting code:
class ApplicationMailer < ActionMailer::Base
default from: Setting.get(:from_email)
This code is not executed on a per-email basis, but only on app boot. So we should either see if we can execute it in a proc:
class ApplicationMailer < ActionMailer::Base
default from: -> { Setting.get(:from_email) }
Or find some other way of setting the "from" per-email, instead of as the ApplicationMailers default
The text was updated successfully, but these errors were encountered:
We have the SMTP settings functionality that allows a user to load SMTP settings from the database. This way people are able to dynamically configure the sending mail server for their Intercity instance.
In case of the "from email" setting, this is currently nog working properly. The setting is loaded at the class level in
ApplicationMailer
, which only gets loaded when the app or sidekiq worker starts up. This is a problem for first-use users, that have a blank from email setting when the Sidekiq service it started on the first run. Because of the class-level code, the email from setting is never updated, unless you restart the running Sidekiq service or full Intercity container.This is the conflicting code:
This code is not executed on a per-email basis, but only on app boot. So we should either see if we can execute it in a proc:
Or find some other way of setting the "from" per-email, instead of as the
ApplicationMailer
s defaultThe text was updated successfully, but these errors were encountered: