[Ruby SDK]
Ruby on Rails
Ship password resets and receipts from Rails controllers and Active Job with the Ruby gem.
1
Install the Ruby package
bash
gem install reloop-email2
Send email from Ruby on Rails
send_email.rb
1require 'reloop'2
3class EmailsController < ApplicationController4 def create5 Reloop.api_key = ENV['RELOOP_API_KEY']6
7 email = Reloop::Emails.send(8 from: 'Acme <onboarding@yourdomain.com>',9 to: [params[:to]],10 subject: 'Hello from Rails',11 html: '<strong>It works!</strong>'12 )13
14 render json: { id: email[:id] }15 end16end3
GitHub, examples, and API reference
4
Need more help?
- Need help? Contact Support.
- Chat with Reloop developers on Discord.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.
Send with Ruby on Rails.
Get an API key and ship transactional email from Ruby on Rails using the official Ruby SDK.