Expand description
§JetEmail Rust SDK
Official Rust SDK for the JetEmail email API.
§Quick Start
let client = jetemail::JetEmail::new("je_your_api_key");
let email = jetemail::CreateEmailOptions::new(
"you@example.com",
"recipient@example.com",
"Hello from JetEmail!",
)
.with_html("<h1>Hello!</h1>");
let response = client.emails.send(email).await?;
println!("Sent email: {}", response.id);§Blocking Usage
Enable the blocking feature in your Cargo.toml:
[dependencies]
jetemail = { version = "0.1", features = ["blocking"] }Then use the same API synchronously:
ⓘ
let client = jetemail::JetEmail::new("je_your_api_key");
let response = client.emails.send(email)?;Structs§
- Attachment
- An email attachment.
- Batch
Email Response - Response from sending a batch of emails.
- Batch
Svc - Service for sending batch emails via the JetEmail API.
- Config
- Configuration for the JetEmail API client.
- Config
Builder - Builder for constructing a
Config. - Create
Email Options - Options for creating and sending an email.
- Create
Email Response - Response from sending an email.
- Emails
Svc - Service for sending individual emails via the JetEmail API.
- Error
Response - Error response returned by the JetEmail API.
- JetEmail
- The JetEmail API client.
Enums§
- Error
- Top-level error type for the JetEmail SDK.
Traits§
- Into
Email Recipients - Trait for types that can be converted into a list of email recipients.
Type Aliases§
- Result
- Convenience result type for the JetEmail SDK.