-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: optional override for Postmark email From: field #354
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allows an optional POSTMARK_SENDER env variable to be set alongside POSTMARK_TOKEN in case token is not approved for sending from the main/real domain. this enables me to set up a local environment and test from my own Postmark account without needing production keys
alanshaw
approved these changes
Jan 25, 2023
@natevw would you mind fixing the lint error reported by CI 🙏? |
per storacha#354 (comment) feedback Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Looks like we need to update the cloudflare token? |
travis
pushed a commit
that referenced
this pull request
Feb 16, 2023
🤖 I have created a release *beep* *boop* --- ## [4.10.0](access-api-v4.9.0...access-api-v4.10.0) (2023-02-16) ### Features * add support for access/authorize and update ([#392](#392)) ([9c8ca0b](9c8ca0b)), closes [#386](#386) * optional override for Postmark email From: field ([#354](#354)) ([f6b2350](f6b2350)) * rm /reproduce-cloudflare-error route ([#426](#426)) ([99cbd2f](99cbd2f)) * rm upload-api-proxy ability to route to separate environment audiences ([#407](#407)) ([5cfe274](5cfe274)) ### Bug Fixes * align postmark/welcome.txt with .html version ([#431](#431)) ([a53d6e6](a53d6e6)) * avoid email delegation via GET request ([#430](#430)) ([d282d6a](d282d6a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
gobengo
pushed a commit
that referenced
this pull request
Apr 11, 2023
This change allows an optional `POSTMARK_SENDER` env variable to be set alongside the existing `POSTMARK_TOKEN` in case the configure token's account is not approved for sending from the default (main/real) domain. Without this the "From: …" sender email address is hardcoded at quite a low-level which makes it difficult for code re-use. With this change, I'm enabled to set up a local environment and test from my *own* Postmark account without needing production keys. (Since I don't own or control the domain, sending an email from `anything@dag.house` gets rejected by the Postmark server with an error if requested via my own API token.) I have avoided touching most of the many places where environment variables are handled because most of those deal in terms of **required** env. This new config variable is optional: available for those who need it, but if not set, the email logic simply stays defaulted to what was the hardcoded sender. --------- Co-authored-by: Alan Shaw <alan.shaw@protocol.ai> Co-authored-by: Travis Vachon <travis.vachon@gmail.com>
gobengo
pushed a commit
that referenced
this pull request
Apr 11, 2023
🤖 I have created a release *beep* *boop* --- ## [4.10.0](access-api-v4.9.0...access-api-v4.10.0) (2023-02-16) ### Features * add support for access/authorize and update ([#392](#392)) ([bf41071](bf41071)), closes [#386](#386) * optional override for Postmark email From: field ([#354](#354)) ([00db0ec](00db0ec)) * rm /reproduce-cloudflare-error route ([#426](#426)) ([158f309](158f309)) * rm upload-api-proxy ability to route to separate environment audiences ([#407](#407)) ([eefb6c6](eefb6c6)) ### Bug Fixes * align postmark/welcome.txt with .html version ([#431](#431)) ([0d72795](0d72795)) * avoid email delegation via GET request ([#430](#430)) ([e0f67e8](e0f67e8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
gobengo
pushed a commit
that referenced
this pull request
Apr 11, 2023
per #354 (comment) feedback Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
gobengo
pushed a commit
that referenced
this pull request
Apr 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change allows an optional
POSTMARK_SENDER
env variable to be set alongside the existingPOSTMARK_TOKEN
in case the configure token's account is not approved for sending from the default (main/real) domain. Without this the "From: …" sender email address is hardcoded at quite a low-level which makes it difficult for code re-use.With this change, I'm enabled to set up a local environment and test from my own Postmark account without needing production keys. (Since I don't own or control the domain, sending an email from
anything@dag.house
gets rejected by the Postmark server with an error if requested via my own API token.)I have avoided touching most of the many places where environment variables are handled because most of those deal in terms of required env. This new config variable is optional: available for those who need it, but if not set, the email logic simply stays defaulted to what was the hardcoded sender.