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

Allow to config parent mailer #78

Closed
Uysim opened this issue Feb 20, 2020 · 2 comments
Closed

Allow to config parent mailer #78

Uysim opened this issue Feb 20, 2020 · 2 comments

Comments

@Uysim
Copy link
Contributor

Uysim commented Feb 20, 2020

if we do like this

Password.setup do |config|
   config.parent_mailer = "Application"
end

And our mailer inherit from that parent_mailer
So we can allow user to custom options and layout by their base on rails config
We can also remove this remove this Passwordless.default_from_address = "[email protected]"

It got this concept from devise. If you are ok I can help

@mikker
Copy link
Owner

mikker commented Feb 20, 2020

This sounds like an okay approach. PR welcome.

We'll need to support both ways until next major (1.0) so no need to pull out the current approach in you PR 😊

paulRbr added a commit to paulRbr/passwordless that referenced this issue Apr 20, 2020
This PR adds a `parent_mailer` configuration option to the Engine
which can receive a Mailer class from which the passwordless mailer
will inherit from.

By default the Mailer inherits from `ACtionMailer::Base` but allowing
the superclass to be configurable gives users the possibility to
inherit from their own `ApplicationMailer` class for instance.

This is handy to be able to share users' mailer configuration between
all mailers (including the own provided by Passwordless engine).

About mikker#78
paulRbr added a commit to paulRbr/passwordless that referenced this issue Apr 20, 2020
This PR adds a `parent_mailer` configuration option to the Engine
which can receive a Mailer class from which the passwordless mailer
will inherit from.

By default the Mailer inherits from `ACtionMailer::Base` but allowing
the superclass to be configurable gives users the possibility to
inherit from their own `ApplicationMailer` class for instance.

This is handy to be able to share users' mailer configuration between
all mailers (including the own provided by Passwordless engine).

About mikker#78
paulRbr added a commit to paulRbr/passwordless that referenced this issue Apr 20, 2020
This PR adds a `parent_mailer` configuration option to the Engine
which can receive a Mailer class from which the passwordless mailer
will inherit from.

By default the Mailer inherits from `ACtionMailer::Base` but allowing
the superclass to be configurable gives users the possibility to
inherit from their own `ApplicationMailer` class for instance.

This is handy to be able to share users' mailer configuration between
all mailers (including the own provided by Passwordless engine).

About mikker#78
mikker pushed a commit that referenced this issue Apr 30, 2020
This PR adds a `parent_mailer` configuration option to the Engine
which can receive a Mailer class from which the passwordless mailer
will inherit from.

By default the Mailer inherits from `ACtionMailer::Base` but allowing
the superclass to be configurable gives users the possibility to
inherit from their own `ApplicationMailer` class for instance.

This is handy to be able to share users' mailer configuration between
all mailers (including the own provided by Passwordless engine).

About #78
@mikker
Copy link
Owner

mikker commented Sep 9, 2020

Closed in #82

@mikker mikker closed this as completed Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants