Ruby on Rails latest stable (v5.2.3) - 0 notes - Superclass: BaseController
  • 1.0.0
  • 1.1.6
  • 1.2.6
  • 2.0.3
  • 2.1.0
  • 2.2.1
  • 2.3.2
  • 2.3.8
  • 3.0.0
  • 3.0.9
  • 3.1.0
  • 3.2.1
  • 3.2.8
  • 3.2.13
  • 4.0.2
  • 4.1.8
  • 4.2.1
  • 4.2.7
  • 4.2.9
  • 5.1.7
  • 5.2.3
  • 6.0.0 (0)
  • (38)
  • What's this?

Class not available on this version

This class is only available on newer versions. The first available version of the class is shown here.

Ingests inbound emails from Postmark. Requires a RawEmail parameter containing a full RFC 822 message.

Authenticates requests using HTTP basic access authentication. The username is always actionmailbox, and the password is read from the application’s encrypted credentials or an environment variable. See the Usage section below.

Note that basic authentication is insecure over unencrypted HTTP. An attacker that intercepts cleartext requests to the Postmark ingress can learn its password. You should only use the Postmark ingress over HTTPS.


  • 204 No Content if an inbound email is successfully recorded and enqueued for routing to the appropriate mailbox

  • 401 Unauthorized if the request’s signature could not be validated

  • 404 Not Found if Action Mailbox is not configured to accept inbound emails from Postmark

  • 422 Unprocessable Entity if the request is missing the required RawEmail parameter

  • 500 Server Error if the ingress password is not configured, or if one of the Active Record database, the Active Storage service, or the Active Job backend is misconfigured or unavailable


  1. Tell Action Mailbox to accept emails from Postmark:

    # config/environments/production.rb
    config.action_mailbox.ingress = :postmark
  2. Generate a strong password that Action Mailbox can use to authenticate requests to the Postmark ingress.

    Use rails credentials:edit to add the password to your application’s encrypted credentials under action_mailbox.ingress_password, where Action Mailbox will automatically find it:

      ingress_password: ...

    Alternatively, provide the password in the RAILS_INBOUND_EMAIL_PASSWORD environment variable.

  3. Configure Postmark to forward inbound emails to /rails/action_mailbox/postmark/inbound_emails with the username actionmailbox and the password you previously generated. If your application lived at example.com, you would configure your Postmark inbound webhook with the following fully-qualified URL:


    NOTE: When configuring your Postmark inbound webhook, be sure to check the box labeled *“Include raw email content in JSON payload”*. Action Mailbox needs the raw email content to work.

Show files where this class is defined (1 file)
Register or log in to add new notes.