New: the MailCraft MCP server is live — connect your AI agent in one line. Connect your agent →
SDKs

Ruby

Coming soon

Send email from Ruby and Rails applications.

The Ruby SDK isn't released yet — this page shows its planned API. You can send from Ruby today by calling the REST API directly.

Install

gem install mailcraft

Send email

Send from a verified sender on one of your domains.

main.rb
require 'mailcraft'

mailcraft = MailCraft::Client.new(api_key: ENV['MAILCRAFT_API_KEY'])

mailcraft.emails.send(
  from: '[email protected]',
  to: ['[email protected]'],
  subject: 'Welcome!',
  html: '<p>Thanks for signing up.</p>'
)

Keep your API key in the MAILCRAFT_API_KEY environment variable, never in source control. Create one under Settings → API keys, scoped to just what this app needs.

Next steps