### Adding Postmark Rails Gem to Gemfile Source: https://github.com/activecampaign/postmark-rails/blob/main/README.md This snippet shows how to add the `postmark-rails` gem to your application's Gemfile, which is the first step for installation. After adding, run `bundle install` in your terminal to fetch the gem and its dependencies. ```Ruby gem 'postmark-rails' ``` -------------------------------- ### Releasing Postmark Rails Gem via Rake Source: https://github.com/activecampaign/postmark-rails/blob/main/RELEASE.md This command executes the Rake task responsible for releasing a new version of the Postmark Rails gem. It handles pushing the version tag to GitHub and publishing the gem to RubyGems. Users should be aware of a potential issue with Bundler 1.17 where the OTP prompt might be hidden, requiring manual entry. ```Shell rake release ``` -------------------------------- ### Configuring Postmark API Token in Rails 3-5 Secrets Source: https://github.com/activecampaign/postmark-rails/blob/main/README.md This YAML snippet illustrates how to store your Postmark Server API Token in `config/secrets.yml` for Rails 3, 4, and 5 applications. This token is crucial for authenticating your application with the Postmark API and should be treated as sensitive information. ```YAML postmark_api_token: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ``` -------------------------------- ### Configuring Postmark API Token in Rails 6-7 Credentials Source: https://github.com/activecampaign/postmark-rails/blob/main/README.md This YAML snippet demonstrates how to securely store your Postmark Server API Token in `config/credentials.yml.enc` for Rails 6 and 7 applications. The token is essential for authenticating with the Postmark API when sending emails and should be kept confidential. ```YAML postmark_api_token: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ``` -------------------------------- ### Setting Postmark as ActionMailer Delivery Method in Rails 3-5 Source: https://github.com/activecampaign/postmark-rails/blob/main/README.md This Ruby configuration snippet configures ActionMailer to use Postmark as its delivery method in Rails 3, 4, and 5 applications. It fetches the Postmark API token from `Rails.application.secrets`, enabling email sending through Postmark. ```Ruby config.action_mailer.delivery_method = :postmark config.action_mailer.postmark_settings = { :api_token => Rails.application.secrets.postmark_api_token } ``` -------------------------------- ### Setting Postmark as ActionMailer Delivery Method in Rails 6-7 Source: https://github.com/activecampaign/postmark-rails/blob/main/README.md This Ruby configuration sets Postmark as the default email delivery method for ActionMailer in Rails 6 and 7 applications. It retrieves the Postmark API token from the application's credentials, ensuring secure access to the Postmark service for sending emails. ```Ruby config.action_mailer.delivery_method = :postmark config.action_mailer.postmark_settings = { api_token: Rails.application.credentials.postmark_api_token } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.