Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate mailer from address at runtime #3684

Merged
merged 1 commit into from
Sep 10, 2019
Merged

Commits on Sep 10, 2019

  1. Evaluate mailer from address at runtime

    We're reading the value from the database, but the
    `ApplicationMailer.default` method is evaluated when the application is
    started. So if we don't use a Proc, we'll need to restart the server
    every time we change the value in the database, or else the old value
    will still be used.
    
    Using a Proc makes sure the mailer from address is evaluated at runtime,
    so emails are sent using the from address currently defined in the
    database.
    
    The same situation took place using the devise mailer. Now we don't need
    to check for the settings table being present because the Proc in the
    devise initializer won't be evaluated before the settings table is
    created and populated.
    javierm committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    66da02f View commit details
    Browse the repository at this point in the history