Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Send emails with Ruby

Before you start, you'll need:

  1. Install

    Get the Resend Ruby SDK.

    RubyGems
    gem install resend
    Gemfile
    gem 'resend'
  2. Send email using HTML

    The easiest way to send an email is by using the html parameter.

    index.rb
    require "resend"
    
    Resend.api_key = "re_xxxxxxxxx"
    
    params = {
      "from": "Acme <onboarding@resend.dev>",
      "to": ["delivered@resend.dev"],
      "subject": "hello world",
      "html": "<strong>it works!</strong>"
    }
    
    sent = Resend::Emails.send(params)
    puts sent
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu