-
Notifications
You must be signed in to change notification settings - Fork 333
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
Dynamic sendgrid key #523
Dynamic sendgrid key #523
Conversation
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.
Thanks for this @spunkedy -- it looks great overall! Just a couple small questions.
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.
@spunkedy thanks so much for coming back and making those fixes! I left a couple more comments. If you have the time, I'd love to get those addressed and merge this in. If you don't have the time, let me know. We can get this in, and I can fix those things after.
api_key: "my_api_key" | ||
# or {:system, "SENDGRID_API_KEY"}, | ||
# or {ModuleName, :method_name, []} | ||
# or &ModuleName.method_name/0 |
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.
I saw the discussion in #523 (comment), and I saw that you removed the anonymous function in 61409d3 (thank you!).
Is &ModuleName.method_name/0
technically an anonymous function as well? Doesn't the capture operator create an anonymous function? Do you know if this will work or should we remove it as well?
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.
I don't think it is an anonymous function. and looking back at the the driving factor behind this, https://hexdocs.pm/stripity_stripe/readme.html#configuration
uses the anonymous function. It's syntaxtual at this point, so I don't mind just the first 2
I have been using
config :notification, Notification.Mailer,
adapter: Bamboo.SendGridAdapter,
api_key: {Notification.Secrets, :sendgrid_secret, []},
hackney_opts: [
recv_timeout: :timer.minutes(1)
]
for a while now without issue.
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.
should be updated now
Thank you so much @spunkedy!! I really appreciate coming back and updating all of this! |
Fixes #522