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

# Quickstart

> Add the Paubox Rails gem, configure credentials, and send your first HIPAA-compliant email in minutes.

<Steps>
  <Step title="Add the gem">
    Add `paubox_rails` to your Gemfile:

    ```ruby theme={null}
    gem 'paubox_rails'
    ```

    Then install:

    ```bash theme={null}
    bundle install
    ```
  </Step>

  <Step title="Configure credentials">
    Create `config/initializers/paubox.rb`:

    ```ruby theme={null}
    Paubox.configure do |config|
      config.api_key  = ENV['PAUBOX_API_KEY']
      config.api_user = ENV['PAUBOX_API_USER']
    end
    ```

    To obtain credentials, see [Authentication](/rails-sdk/authentication).
  </Step>

  <Step title="Set the delivery method">
    In `config/application.rb` (or an environment-specific file):

    ```ruby theme={null}
    config.action_mailer.delivery_method = :paubox
    ```
  </Step>

  <Step title="Create a mailer and send">
    Generate a mailer if you don't have one:

    ```bash theme={null}
    rails generate mailer UserMailer
    ```

    Define an action in `app/mailers/user_mailer.rb`:

    ```ruby theme={null}
    class UserMailer < ApplicationMailer
      def welcome_email
        @user = params[:user]
        mail(
          to:      @user.email,
          from:    "noreply@yourdomain.com",
          subject: "Welcome to the portal"
        )
      end
    end
    ```

    Add a template at `app/views/user_mailer/welcome_email.html.erb`:

    ```erb theme={null}
    <p>Hello <%= @user.name %>,</p>
    <p>Your account is ready. Log in at any time.</p>
    ```

    Deliver it:

    ```ruby theme={null}
    UserMailer.with(user: current_user).welcome_email.deliver_now
    ```

    The email is sent encrypted via Paubox.
  </Step>
</Steps>

## Next steps

* [Email delivery](/rails-sdk/email-delivery): per-message options, attachments, async delivery
* [Forms client](/rails-sdk/forms-client): retrieve form schemas and submit responses
