Replies: 2 comments 2 replies
-
Initially, Initially, the mailer received all parameters needed for the email body in arguments, but that meant potentially exposing secrets such as tokens and emaila via logs, and it didn't work with API + SPA that live on different domains. So, the mailer arguments now only receive raw tokens and no email addresses, so the mailer needs to do more work. Note that the code changes to do what you want would have to be more complicated than what you've shown, as certain instance variables need to be set. I found it to require less code to reimplement part of the logic, and I'm relying on developers looking at the generated mailer, which should make it clear to them that Rodauth config such as Since this is not a bug, I'm moving it to discussions. |
Beta Was this translation helpful? Give feedback.
-
After giving it some more thought, I'm considering going back to generating the mailer config separate from I also managed to rewrite the generated mailer to reuse I'm not sure how much extracting the mailer out of |
Beta Was this translation helpful? Give feedback.
-
Follow up to: jeremyevans/rodauth#251
To avoid that divergence, wondering if it would be good idea to keep default Mailers behaviors as close as possible to Rodauth's, for example:
to:
field andbody:
via a proxy instance var:https://github.com/janko/rodauth-rails/blob/main/lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb#L6
https://github.com/janko/rodauth-rails/blob/main/lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_account.text.erb
Beta Was this translation helpful? Give feedback.
All reactions