{"id":13878138,"url":"https://github.com/resend/resend-ruby","last_synced_at":"2025-10-11T10:48:13.545Z","repository":{"id":64586924,"uuid":"576803966","full_name":"resend/resend-ruby","owner":"resend","description":"Resend's Ruby SDK","archived":false,"fork":false,"pushed_at":"2025-10-06T13:43:27.000Z","size":230,"stargazers_count":36,"open_issues_count":7,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T15:28:37.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://resend.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/resend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-11T02:56:27.000Z","updated_at":"2025-10-06T13:43:29.000Z","dependencies_parsed_at":"2023-10-11T18:17:03.084Z","dependency_job_id":"596930df-760b-4654-bfc1-68ae71306008","html_url":"https://github.com/resend/resend-ruby","commit_stats":null,"previous_names":["resend/resend-ruby","resendlabs/resend-ruby"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/resend/resend-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resend","download_url":"https://codeload.github.com/resend/resend-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002016,"owners_count":26083258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:01:40.866Z","updated_at":"2025-10-11T10:48:13.539Z","avatar_url":"https://github.com/resend.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Resend Ruby and Rails SDK\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n![Build](https://github.com/drish/resend-ruby/actions/workflows/build.yml/badge.svg)\n[![Gem Version](https://badge.fury.io/rb/resend.svg)](https://badge.fury.io/rb/resend)\n\n---\n\n## Installation\n\nTo install Resend Ruby and Rails SDK, simply execute the following command in a terminal:\n\nVia RubyGems:\n\n```\ngem install resend\n```\n\nVia Gemfile:\n\n```\ngem 'resend'\n```\n\n## Setup\n\nFirst, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com).\n\n```ruby\nrequire \"resend\"\nResend.api_key = ENV[\"RESEND_API_KEY\"]\n```\n\nor\n\n```ruby\nrequire \"resend\"\nResend.configure do |config|\n  config.api_key = ENV[\"RESEND_API_KEY\"]\nend\n```\n\nThe `#api_key` method also accepts a block without arguments, which can be useful for lazy or dynamic loading of API keys.\n\n```ruby\nrequire \"resend\"\nResend.api_key = -\u003e { ENV[\"RESEND_API_KEY\"] }\n```\n\n```ruby\nResend.configure do |config|\n  config.api_key = -\u003e { Current.user.resend_api_key } # Assumes the user has a `resend_api_key` attribute.\nend\n```\n\n## Example\n\n```rb\nrequire \"resend\"\n\nResend.api_key = ENV[\"RESEND_API_KEY\"]\n\nparams = {\n  \"from\": \"onboarding@resend.dev\",\n  \"to\": [\"delivered@resend.dev\", \"your@email.com\"],\n  \"html\": \"\u003ch1\u003eHello World\u003c/h1\u003e\",\n  \"subject\": \"Hey\"\n}\nr = Resend::Emails.send(params)\nputs r\n```\n\nYou can view all the examples in the [examples folder](https://github.com/drish/resend-ruby/tree/main/examples)\n\n# Rails and ActionMailer support\n\nThis gem can be used as an ActionMailer delivery method, add this to your `config/environments/environment.rb` file.\n\n```ruby\nconfig.action_mailer.delivery_method = :resend\n```\n\nCreate or update your mailer initializer file and replace the placeholder with your Resend API Key.\n\n```rb\n# /config/initializers/resend.rb\nResend.api_key = \"re_123456\"\n```\n\nAfter that you can deliver_now!, example below:\n\n```ruby\n#/app/mailers/user_mailer\nclass UserMailer \u003c ApplicationMailer\n  default from: 'you@yourdomain.io'\n  def welcome_email\n    @user = params[:user]\n    @url  = 'http://example.com/login'\n    mail(to: [\"example2@mail.com\", \"example1@mail.com\"], subject: 'Hello from Resend')\n  end\nend\n\n# anywhere in the app\nu = User.new name: \"derich\"\nmailer = UserMailer.with(user: u).welcome_email\nmailer.deliver_now!\n# =\u003e {:id=\u003e\"b8f94710-0d84-429c-925a-22d3d8f86916\", from: 'you@yourdomain.io', to: [\"example2@mail.com\", \"example1@mail.com\"]}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresend%2Fresend-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresend%2Fresend-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresend%2Fresend-ruby/lists"}