fix: validate template UUIDs and parse Plunk validation errors

This commit is contained in:
2026-04-29 22:13:39 -05:00
parent 532ef8a18d
commit ced1a91ba9
6 changed files with 154 additions and 28 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ use serde_json::json;
async fn main() -> Result<(), plunk_rs::Error> {
let client = Client::new("sk_your_plunk_api_key")?;
let email = Email::template("user@example.com", "tpl_xxxxxxxx")?
let email = Email::template("user@example.com", "550e8400-e29b-41d4-a716-446655440000")?
.with_data(json!({ "first_name": "Ada" }))?;
client.send(&email).await?;