-
Notifications
You must be signed in to change notification settings - Fork 13
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
Mandrill key should not have to be an environment variable #8
Comments
@RobinClowers I believe the documentation just needs to be updated. This was previously added: https://github.com/slogsdon/mandrill-elixir/blob/master/lib/mandrill.ex#L49-L52. It pulls the key from Application environment variable, but if nil, it reaches out to System environment variable. As a note, this should probably be updated as well to remove the |
That's great news, I'll send you a pr to update the docs this weekend. |
When you say remove the |
@RobinClowers, Here's what I meant by that statement. Right now this is essentially what the code looks like: Application.get_env(:mandrill, :key) || System.get_env("MANDRILL_KEY") When I said that the Application.get_env(:mandrill, :key, System.get_env("MANDRILL_KEY")
Looking back, I could have been clearer on that, so I apologize for any confusion. |
Awesome, thanks for the explanation, that makes total sense. |
Requiring the key to be set as in env does not seem to be idiomatic for elixir apps, it would be great if you could use the mix config system. You could still default the value what's in env, but fall back to using the config value defined by mix.
The text was updated successfully, but these errors were encountered: