Struct postmark_client::client::Client [−][src]
pub struct Client { /* fields omitted */ }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
pub 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
pub 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
pub 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
Lists all the bounce stats for the server the token is associated with.
https://postmarkapp.com/developer/api/bounce-api#delivery-stats
pub 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.
Gets a single bounced email using the provided ID.
https://postmarkapp.com/developer/api/bounce-api#single-bounce
pub 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
pub 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
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more