1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Ergonomic Rust SDK for the [useSend](https://usesend.com) email service.
//!
//! This crate wraps [`usesend_api`] with a user-friendly API.
//!
//! # Quick Start
//!
//! ```no_run
//! # async fn example() -> usesend::ApiResult<()> {
//! use usesend_api::types::email::SendEmailRequest;
//!
//! let client = usesend::UseSend::new("us_api_key");
//!
//! let email = SendEmailRequest::builder()
//! .from("hello@example.com")
//! .to("user@example.com")
//! .subject("Hello!")
//! .html("<h1>Hi</h1>")
//! .build();
//!
//! let resp = client.emails.send(&email).await?;
//! println!("Sent: {}", resp.email_id);
//! # Ok(())
//! # }
//! ```
//!
//! # Environment Variable
//!
//! You can use `UseSend::from_env()` or `UseSend::default()` which reads the
//! `USESEND_API_KEY` environment variable.
pub use Campaigns;
pub use UseSend;
pub use ContactBooks;
pub use Contacts;
pub use Domains;
pub use Emails;
pub use types;
pub use ;