pub struct Client { /* private fields */ }
Expand description
Client exposes the Postmark functionality to be easily used within rust applications.
The client can create its own internal reqwest::Client or one can be provided if there are specific configurations desired by the application.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn send_batch_emails(
&self,
emails: &[Email],
) -> Result<Vec<EmailResponse>, PostmarkClientError>
pub async fn send_batch_emails( &self, emails: &[Email], ) -> Result<Vec<EmailResponse>, PostmarkClientError>
Sends a batch of Emails in a single request, each email in the batch has a corresponding EmailResponse in the result of this function.
https://postmarkapp.com/developer/api/email-api#send-batch-emails
Sourcepub async fn send_batch_template_emails<M>(
&self,
email: &[TemplatedEmail<M>],
) -> Result<EmailResponse, PostmarkClientError>where
M: Serialize,
pub async fn send_batch_template_emails<M>(
&self,
email: &[TemplatedEmail<M>],
) -> Result<EmailResponse, PostmarkClientError>where
M: Serialize,
Sends a batch of template emails in a single request, each email in the batch has a corresponding EmailResoinse in the result of this function.
https://postmarkapp.com/developer/api/templates-api#send-batch-with-templates
Sourcepub async fn send_email(
&self,
email: &Email,
) -> Result<EmailResponse, PostmarkClientError>
pub async fn send_email( &self, email: &Email, ) -> Result<EmailResponse, PostmarkClientError>
Sourcepub async fn send_template_email<M>(
&self,
email: &TemplatedEmail<M>,
) -> Result<EmailResponse, PostmarkClientError>where
M: Serialize,
pub async fn send_template_email<M>(
&self,
email: &TemplatedEmail<M>,
) -> Result<EmailResponse, PostmarkClientError>where
M: Serialize,
Sends a template email.
https://postmarkapp.com/developer/api/templates-api#email-with-template
Source§impl Client
impl Client
Sourcepub async fn get_delivery_stats(
&self,
) -> Result<DeliveryStatsResponse, PostmarkClientError>
pub async fn get_delivery_stats( &self, ) -> Result<DeliveryStatsResponse, PostmarkClientError>
Lists all the bounce stats for the server the token is associated with.
https://postmarkapp.com/developer/api/bounce-api#delivery-stats
Sourcepub async fn get_bounces(
&self,
query: &BouncesQueryParamaters,
) -> Result<BouncedEmailsReponse, PostmarkClientError>
pub async fn get_bounces( &self, query: &BouncesQueryParamaters, ) -> Result<BouncedEmailsReponse, PostmarkClientError>
The bounces search allows you to return up-to 10,000 bounces in a search. For searches where you’re looking to retrieve more than 10,000 bounces use parameters like todate and fromdate to filter the messages.
Sourcepub async fn get_bounce(
&self,
bounce_id: &str,
) -> Result<BouncedEmail, PostmarkClientError>
pub async fn get_bounce( &self, bounce_id: &str, ) -> Result<BouncedEmail, PostmarkClientError>
Gets a single bounced email using the provided ID.
https://postmarkapp.com/developer/api/bounce-api#single-bounce
Sourcepub async fn get_bounce_dump(
&self,
bounce_id: &str,
) -> Result<BounceDumpResponse, PostmarkClientError>
pub async fn get_bounce_dump( &self, bounce_id: &str, ) -> Result<BounceDumpResponse, PostmarkClientError>
Gets the SMTP dump for the bounced email.
https://postmarkapp.com/developer/api/bounce-api#bounce-dump
Sourcepub async fn activate_bounce(
&self,
bounce_id: &str,
) -> Result<ActivateBounceResponse, PostmarkClientError>
pub async fn activate_bounce( &self, bounce_id: &str, ) -> Result<ActivateBounceResponse, PostmarkClientError>
Reactivates thes email address in the bounced email
https://postmarkapp.com/developer/api/bounce-api#activate-bounce