carbon_mailjet_adapter
carbon_mailjet_adapter
Integration for Lucky's Carbon email library and mailjet.cr to send emails via Mailjet.
Installation
- Add the dependency to your
shard.yml
:
dependencies:
carbon_mailjet_adapter:
github: wout/carbon_mailjet_adapter
- Run
shards install
Usage
Include the shard:
require "carbon_mailjet_adapter"
Configure mailjet.cr:
Mailjet.configure do |settings|
settings.api_key = "your-api-key"
settings.secret_key = "your-secret-key"
settings.default_from = "noreply@email.com"
end
And configure the adapter in your Lucky app:
# config/email.cr
require "carbon_mailjet_adapter"
BaseEmail.configure do |settings|
if LuckyEnv.production? || LuckyEnv.staging?
settings.adapter = Carbon::MailjetAdapter.new
elsif ...
...
end
end
Important: For simplicity and predictability, this adapter will always send using Mailjet's v3.1 sending API, regardless of the Mailjet configuration in your project.
Contributing
- Fork it (https://github.com/wout/carbon_mailjet_adapter/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'feat: add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Wout - creator and maintainer
Repository
carbon_mailjet_adapter
Owner
Statistic
- 0
- 0
- 0
- 0
- 5
- 7 months ago
- April 25, 2024
License
MIT License
Links
Synced at
Fri, 22 Nov 2024 05:40:13 GMT
Languages