pub struct Emails { /* private fields */ }Expand description
Accessed as client.emails().
Implementations§
Source§impl Emails
impl Emails
Sourcepub async fn send(&self, message: &SendEmail) -> Result<SendEmailResponse>
pub async fn send(&self, message: &SendEmail) -> Result<SendEmailResponse>
Send a single email.
Sourcepub async fn send_batch(&self, messages: &[SendEmail]) -> Result<BatchResponse>
pub async fn send_batch(&self, messages: &[SendEmail]) -> Result<BatchResponse>
Send up to your plan’s batch limit in one call. The API accepts a bare array of messages and returns a per-message result set.
Sourcepub async fn validate(&self, message: &SendEmail) -> Result<ValidationResult>
pub async fn validate(&self, message: &SendEmail) -> Result<ValidationResult>
Dry-run a send: check whether the message would be accepted without actually sending it.
Sourcepub async fn list(
&self,
status: Option<&str>,
page: Option<u64>,
limit: Option<u64>,
) -> Result<Vec<Email>>
pub async fn list( &self, status: Option<&str>, page: Option<u64>, limit: Option<u64>, ) -> Result<Vec<Email>>
List recent emails, newest first. page is zero-based.
Sourcepub async fn get(&self, id: &str) -> Result<EmailDetail>
pub async fn get(&self, id: &str) -> Result<EmailDetail>
Fetch a single email with its bodies and events.
Sourcepub async fn events(&self, id: &str) -> Result<Vec<EmailEvent>>
pub async fn events(&self, id: &str) -> Result<Vec<EmailEvent>>
List delivery / open / click / bounce events for an email.
Sourcepub async fn retry(&self, id: &str) -> Result<SendEmailResponse>
pub async fn retry(&self, id: &str) -> Result<SendEmailResponse>
Re-send a bounced, rejected, or failed email as a new message.
Sourcepub async fn search(
&self,
q: Option<&str>,
status: Option<&str>,
tag: Option<&str>,
page: Option<u64>,
limit: Option<u64>,
) -> Result<Vec<EmailSearchHit>>
pub async fn search( &self, q: Option<&str>, status: Option<&str>, tag: Option<&str>, page: Option<u64>, limit: Option<u64>, ) -> Result<Vec<EmailSearchHit>>
Search emails. q supports inline tokens (to:, from:, status:,
domain:, tag:); leftover words are matched as free text.
Sourcepub async fn list_scheduled(&self) -> Result<Vec<ScheduledEmail>>
pub async fn list_scheduled(&self) -> Result<Vec<ScheduledEmail>>
List emails scheduled for future delivery, soonest first.
Sourcepub async fn cancel_scheduled(&self, id: &str) -> Result<IdStatus>
pub async fn cancel_scheduled(&self, id: &str) -> Result<IdStatus>
Cancel a scheduled email.
Sourcepub async fn send_scheduled_now(&self, id: &str) -> Result<IdStatus>
pub async fn send_scheduled_now(&self, id: &str) -> Result<IdStatus>
Send a scheduled email immediately instead of waiting.
Sourcepub async fn updates(&self, since: &str) -> Result<Vec<Email>>
pub async fn updates(&self, since: &str) -> Result<Vec<Email>>
Poll for emails whose status changed at or after since (ISO 8601).
Capped at 50 rows.
Sourcepub async fn get_saved_searches(&self) -> Result<Vec<Value>>
pub async fn get_saved_searches(&self) -> Result<Vec<Value>>
Get the caller’s saved searches.