Skip to content

Support the use of TemplateAlias#40

Open
nkezhaya wants to merge 1 commit intopablo-co:masterfrom
nkezhaya:template-alias
Open

Support the use of TemplateAlias#40
nkezhaya wants to merge 1 commit intopablo-co:masterfrom
nkezhaya:template-alias

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