Skip to content
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

Support the use of TemplateAlias #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nkezhaya
Copy link

Hi! Thanks for the work on this library!

Instead of requiring TemplateId to be passed in, this allows TemplateAlias to be used instead, via:

email |> template({:alias, "my-template-alias"})

This PR also includes another important fix: when a template is passed into the request, if the HtmlBody or TextBody keys are present (even if the values are null), Postmark responds with: {"ErrorCode":402,"Message":"Received invalid JSON input."} 🙄

I've removed the inclusion of these keys in the request if a template is used.

@jonleighton
Copy link

Hi @whitepaperclip, thanks for your work on this. I'd love to see it merged. I did notice that your PR contains a bunch of unrelated formatting changes, presumably due to an editor integration with mix format or something. It might be better to remove those changes so that it's easier to review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants