-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Introduce suspenders:email
generator
#1162
Conversation
def configure_development_environment | ||
environment %(config.action_mailer.default_url_options = { host: "localhost", port: 3000 }), env: "development" | ||
end | ||
|
||
def configure_test_environment | ||
environment %(config.action_mailer.default_url_options = { host: "www.example.com" }), env: "test" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These might be able to be removed if rails/rails#51191 is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove once there's a new release.
def configure_development_environment | ||
environment %(config.action_mailer.default_url_options = { host: "localhost", port: 3000 }), env: "development" | ||
end | ||
|
||
def configure_test_environment | ||
environment %(config.action_mailer.default_url_options = { host: "www.example.com" }), env: "test" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also noting I didn't need to config.asset_host. Everything worked without issue in test
and development
.
c82f2ea
to
c1ecef7
Compare
Creates [email interceptor][] to ensure emails are sent to preconfigured addresses in non-production environments. Drops support for [Recipient Interceptor][], since this functionality is supported in Rails Core. In order to enable the interceptor, set `EMAIL_RECIPIENTS` to a comma-separated list. ```sh INTERCEPTOR_ADDRESSES="[email protected],[email protected]" bin/rails s ``` Configures [default_url_options][] in `test` and `development` environments so that `*_url` helpers will work. Note that we do not configure `production`, since we've determined the `delivery_method` is something each project will configure independently. This means we'll just use the [default configuration][], which is `smtp`. [email interceptor]: https://guides.rubyonrails.org/action_mailer_basics.html#intercepting-emails [Recipient Interceptor]: https://github.com/croaky/recipient_interceptor [default_url_options]: https://guides.rubyonrails.org/action_mailer_basics.html#generating-urls-in-action-mailer-views [default configuration]: https://guides.rubyonrails.org/configuring.html#config-action-mailer-delivery-method
c1ecef7
to
19ce9b1
Compare
Creates [email interceptor][] to ensure emails are sent to preconfigured addresses in non-production environments. Drops support for [Recipient Interceptor][], since this functionality is supported in Rails Core. In order to enable the interceptor, set `EMAIL_RECIPIENTS` to a comma-separated list. ```sh INTERCEPTOR_ADDRESSES="[email protected],[email protected]" bin/rails s ``` Configures [default_url_options][] in `test` and `development` environments so that `*_url` helpers will work. Note that we do not configure `production`, since we've determined the `delivery_method` is something each project will configure independently. This means we'll just use the [default configuration][], which is `smtp`. [email interceptor]: https://guides.rubyonrails.org/action_mailer_basics.html#intercepting-emails [Recipient Interceptor]: https://github.com/croaky/recipient_interceptor [default_url_options]: https://guides.rubyonrails.org/action_mailer_basics.html#generating-urls-in-action-mailer-views [default configuration]: https://guides.rubyonrails.org/configuring.html#config-action-mailer-delivery-method
Creates email interceptor to ensure emails are sent to preconfigured
addresses in non-production environments. Drops support for Recipient
Interceptor, since this functionality is supported in Rails Core.
In order to enable the interceptor, set
EMAIL_RECIPIENTS
to acomma-separated list.
INTERCEPTOR_ADDRESSES="[email protected],[email protected]" bin/rails s
Configures default_url_options in
test
anddevelopment
environments so that
*_url
helpers will work.Note that we do not configure
production
, since we've determined thedelivery_method
is something each project will configureindependently. This means we'll just use the default configuration,
which is
smtp
.