Comments (3)
I'm successfully using the following code in an initializer config/initializers/postmark.rb
# Configures Postmark with API settings
ActionMailer::Base.postmark_settings = {
:api_key => 'api-key-goes-here'
}
from postmark-rails.
In most cases Postmark is only used to deliver emails in production environment. If there is a staging or QA environment, then per-environment settings are required. This is why itโs recommended to use application.rb
and its successors production.rb
, development.rb
, etc.
Of course, you still can use an initializer. This is all up to you. I donโt see a problem here. This is worth mentioning in the docs though. Thanks!
from postmark-rails.
The rails style guide recommends putting gem-specific configuration in the initializers folder: https://github.com/bbatsov/rails-style-guide#configuration
In the rails default configuration, delivery_method
is set independently in each environment file so it seems confusing to set the production value in application.rb and override it in development/test instead of just setting it to :postmark
in production.rb
I can write a pull request if you think this is a good change :)
from postmark-rails.
Related Issues (20)
- Does a soft bounce trigger a Postmark::InactiveRecipientError HOT 2
- Deprecation: Rails 7.1.1 - Using preview_path= option is deprecated and will be removed in Rails 7.2 HOT 2
- Compatibility with latest postmark gem
- Gem version too constrained?
- Sending through different "Servers" HOT 1
- Release a new version of the gem to complete #76 HOT 1
- Emoji encoding issues in subject lines with Rails 3/4 apps HOT 1
- Add support for message stream archival HOT 2
- Message stream is not used when specified HOT 2
- Update default `http_ssl_version` - Similar issue to Postmark-gem HOT 5
- Postmark disabling TLSv1.0, What do I need to do? HOT 1
- Recipient email format `"Recipient Name" <[email protected]>` results in `Postmark::InvalidEmailAddressError` HOT 2
- Delivery Options HOT 1
- Rails 7 support HOT 2
- Cannot send metadata with #deliver_later HOT 1
- Postmark::InactiveRecipientError No Error Recipients HOT 1
- https release timeline HOT 2
- Postmark::ApiInputError with attachments HOT 3
- Calendar Attachments HOT 11
- Wrong documentation link HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postmark-rails.