Expand description
§Unosend Rust SDK
Official Rust SDK for Unosend - Email API for developers.
§Quick Start
use unosend::{Unosend, SendEmailRequest};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Unosend::new("un_your_api_key");
let response = client.emails().send(SendEmailRequest {
from: "hello@yourdomain.com".into(),
to: "user@example.com".into(),
subject: "Welcome!".into(),
html: Some("<h1>Hello!</h1>".into()),
..Default::default()
}).await?;
println!("Email sent: {}", response.id);
Ok(())
}Structs§
- Attachment
- Email attachment.
- Audience
- Audience information.
- Audience
List - List of audiences.
- Audiences
Api - Audience management API.
- Contact
- Contact information.
- Contact
List - List of contacts.
- Contacts
Api - Contact management API.
- Create
Contact Request - Request to create a contact.
- DnsRecord
- DNS record for domain verification.
- Domain
- Domain information.
- Domain
List - List of domains.
- Domains
Api - Domain management API.
- Email
Details - Detailed email information.
- Emails
Api - Email sending API.
- Send
Email Request - Request to send an email.
- Send
Email Response - Response from sending an email.
- Unosend
- Main client for the Unosend API.
Enums§
- Email
Recipient - Email recipient (single or multiple).
- Unosend
Error - Error type for Unosend API operations.