Tip
Need help? Join our Discord or email [email protected] for personalized support.
The Bento Action Mailer gem makes it quick and easy to send transactional emails in your Ruby on Rails applications using Bento's HTTPS API. We provide a simple Action Mailer adapter that integrates seamlessly with Rails 6 and above, leveraging Bento's excellent deliverability and support for marketing emails.
Get started with our 📚 integration guides, or 📘 browse the SDK reference.
🐶 Battle-tested at Datadoor.io and some of Bento's microservices.
❤️ Thank you @SebastianSzturo from DataDoor for your contribution. Want to contribute? PRs welcome!
- Simple integration: Easily integrate with Rails' Action Mailer for sending transactional emails.
- Bento API support: Leverage Bento's HTTPS API for reliable email delivery.
- Rails compatibility: Works with Rails 6 and above.
- Simplified email stack: Ideal for straightforward applications looking to streamline their email infrastructure.
- Ruby on Rails 6.0+
- Bento account with API credentials
Add the gem to your application's Gemfile:
gem 'bento-actionmailer', github: 'bentonow/bento-actionmailer', branch: 'main'
gem 'premailer-rails' # Requirement for Rails 7.0 apps and beyond. `premailer-rails` will inline all your CSS and ensure there is both an HTML and text version for every email (Bento uses this). Then run:
bundle installAdd the following to your config/application.rb or environment-specific configuration file:
config.action_mailer.delivery_method = :bento_actionmailer
config.action_mailer.bento_actionmailer_settings = {
site_uuid: "your-site-uuid",
publishable_key: "your-publishable-key",
secret_key: "your-secret-key"
}Use Action Mailer as you normally would in your Rails application. The gem will handle sending emails through Bento's API.
class WelcomeMailer < ApplicationMailer
def welcome_email
mail(to: '[email protected]', subject: 'Welcome to Our App!')
end
end- Currently, the gem only supports HTML emails. Text-only emails are not supported yet.
- BCC functionality is not available in the current version.
- Attachments are not supported in this version of the gem.
- Custom email headers are not supported at the moment.
- For complex email setups, consider reaching out to the Bento team for support or contributing to the project.
We welcome contributions! Please see our contributing guidelines for details on how to submit pull requests, report issues, and suggest improvements.
The Bento Action Mailer gem is available as open source under the terms of the MIT License.
