pablo-co / bamboo_postmark

A Bamboo adapter for Postmark
MIT License
39 stars 29 forks source link

Support the use of TemplateAlias #40

Open nkezhaya opened 3 years ago

nkezhaya commented 3 years ago

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 commented 2 years ago

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.