Integrate with Reloop using Rust
Official Rust SDK for Reloop. A few lines of code to send production email.
Install
bash
cargo add reloop-emailSend email
send_email.rs
1use reloop_email::ReloopEmail;2
3#[tokio::main]4async fn main() -> Result<(), Box<dyn std::error::Error>> {5 let reloop = ReloopEmail::new(std::env::var("RELOOP_API_KEY")?, None);6
7 let email = reloop8 .emails()9 .send(reloop_email::SendEmailParams {10 from: "Acme <onboarding@yourdomain.com>".into(),11 to: vec!["delivered@yourdomain.com".into()],12 subject: "Hello from Rust".into(),13 html: Some("<strong>It works!</strong>".into()),14 ..Default::default()15 })16 .await?;17
18 println!("Email sent: {}", email.id);19 Ok(())20}Send with Rust.
Get an API key, verify your domain, and ship transactional email in minutes.