Open nkezhaya opened 3 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.
Hi! Thanks for the work on this library!
Instead of requiring
TemplateId
to be passed in, this allowsTemplateAlias
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
orTextBody
keys are present (even if the values arenull
), 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.