postmark-go
postmark-go copied to clipboard
Add support for batched templated emails
Hi,
I need to be able to send batches of templates as well, so I added another function to take care of it.
Feedback is welcome
Thank!
Hi Arttii,
Thanks so much - and apologies for my slow response - I don't know how I missed this.
I've left a couple of comments, but the biggest issue would be around the error handling for this endpoint.
From Postmark docs:
Please note that the /batchWithTemplates endpoint will return a 200-level http status, even when validation for individual messages may fail. Users of these endpoints should check the success and error code for each message in the response from our API (the results are ordered the same as the original messages).
The pkg currently isn't setup to handle errors that return a 200-level response, so some adjustments will be needed so errors can be returned correctly from your new method.
Thanks!
Any updates on this?