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
Kemal?? #1
Comments
You have a point. It'd be nice if there was a more generic env var that all devs would agree on like ie node has This lib isn't designed to be used specifically with Kemal, I just happen to use it that way and I'm paranoid about tests triggering real mail. Thanks for raising this issue BTW, reminds me to get around to finishing this. |
Perhaps we could transfer this verification to Something like: # Current
Mailer.config(provider: Provider::Here)
# New
Mailer.config(provider: Provider::Here, enableSending: true))
|
@crisward Makes sense. And I agree, it would be nice to know at least that you are in a "test" environment, or running specs. |
@kazzkiq seems a bit odd to have a param which basically disables something by default. I think env vars are ideal for this as they describe something about the environment. |
For running tests, I actually have a mock adaptor - https://github.com/crisward/mailer/blob/master/src/mailer/mock.cr So I don't really need that line. It could just get moved up to the calling app. The actual tests explained in my readme are integration tests which send a real emails. Though I still think a unified CRYSTAL_ENV is a useful idea. |
eg
|
Removed ref to kemal, updated readme to help users config there way out of this issue. |
What is this line doing here?
mailer/src/mailer/mailgun.cr
Line 59 in 375aa3e
If this is a shard to send mails for kemal it should be called
kemal_mailer
or something like that.If possible, I'd like shards in Crystal to avoid what happens in Ruby: Ruby is Rails, so let's make every gem know about Rails, just in case...
Could this be modeled in a different way?
The text was updated successfully, but these errors were encountered: