pastjean / postmark-rs

Postmark client for rust
https://docs.rs/postmark
Apache License 2.0
9 stars 9 forks source link

Send batch email with template #26

Closed RaasAhsan closed 1 month ago

RaasAhsan commented 1 month ago

I am interested in sending batches of email with Postmark templates. This corresponds to the API here: https://postmarkapp.com/developer/api/templates-api#send-batch-with-templates . I see an API method to submit a batch of regular email, but can't seem to find one for batch templates. Is this possible today or does it need to be implemented?

Thanks for the great library!

pastjean commented 1 month ago

I haven't looked at postmark api in a while. We don't have the API call currently. If you submit a PR with that new call I'll be happy to put it in.

Otherwise it's pretty easy to implement a new call without a PR even. Just need to implement the Endpoint trait https://github.com/pastjean/postmark-rs/blob/main/src/client.rs#L10

reneklacan commented 1 month ago

Created PR which implements this

@RaasAhsan in the meanwhile you can use it with:

postmark = { git = "https://github.com/reneklacan/postmark-rs", branch = "batch-with-templates" }
pastjean commented 1 month ago

Fixed in #27 and released in #28 (v0.10.2)

(: enjoy