> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apollodeploy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send emails with Ruby

> Send a transactional email with the official Apollo Signal Ruby SDK

The Ruby SDK provides a class-based client and uses
`https://api.signal.apollodeploy.com` by default.

Before you start, [create an API key](/signal/create-an-api-key) with **Emails: Send** permission
and [verify the From domain](/signal/add-a-domain).

<Steps>
  <Step title="Install the SDK">
    ```bash theme={"dark"}
    gem install apollo-deploy-signal-sdk
    ```
  </Step>

  <Step title="Store your API key">
    Set `SIGNAL_API_KEY` in the server environment or secret manager.
  </Step>

  <Step title="Send an email">
    ```ruby theme={"dark"}
    require "apollo_deploy_signal_sdk"

    signal = ApolloDeploySignalSdk.create_client(
      default_headers: {
        "Authorization" => "Bearer #{ENV.fetch('SIGNAL_API_KEY')}"
      }
    )

    request = ApolloDeploySignalSdk::SendEmailRequest.new(
      from: "auth@mail.company.com",
      to: ["alex@example.com"],
      subject: "Reset your password",
      text: "Use the secure link in your account to choose a new password."
    )

    email = signal.emails.send_email(body: request)
    puts email["id"]
    ```
  </Step>
</Steps>

<Note>
  The Ruby transport returns the decoded response as a hash. Recipient fields are arrays, and the
  From domain must be verified in the same Signal project as the API key.
</Note>

<CardGroup cols={2}>
  <Card title="Rails" icon="code" href="/signal/send-with/send-with-rails">
    Use the Rails integration and initializer.
  </Card>

  <Card title="All SDKs" icon="code" href="/signal/send-with/sdk-overview">
    Compare every supported language and framework.
  </Card>
</CardGroup>
