Expand description
Official Rust SDK for Resent transactional email.
use resent::{Resent, SendEmail};
let resent = Resent::new(std::env::var("RESENT_API_KEY").unwrap());
let result = resent
.emails()
.send(SendEmail {
from: "Acme <noreply@yourdomain.com>".into(),
to: vec!["you@example.com".into()],
subject: "Hello World".into(),
html: Some("<strong>It works!</strong>".into()),
..Default::default()
})
.await?;
println!("{:?}", result.submission_id);Structs§
- Emails
- Email API namespace (
resent.emails()). - Resent
- Official Resent API client.
- Send
Email - Request body for
POST /email/send. - Send
Email Response - Successful send response.
Enums§
- Error
- Errors returned by the Resent client.