Skip to main content

Obtain your credentials

The Email API requires two credentials:
  • API key: a secret token that authenticates your requests
  • Username: your Paubox API endpoint username (not your login email)
Both are available in the Paubox dashboard under API Credentials.

Configure the initializer

Create config/initializers/paubox.rb:
The gem registers itself as a Railtie, so this initializer runs before ActionMailer is configured. Credentials are automatically applied to every email delivery; no per-request setup is needed.

Set environment variables

Add your credentials to your environment (e.g. via a .env file with dotenv-rails, Rails credentials, or your deployment platform’s secret management):

Forms client

PauboxRails::Forms::Client requires no credentials. Form submissions are associated with the form ID, not an API key.

Security notes

  • Never hard-code credentials in initializer files; always read from environment variables or encrypted credentials.
  • The gem does not log API keys or request bodies.