Struct SenderVerification

Source
pub struct SenderVerification {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl SenderVerification

Source

pub async fn get_verified_senders_domains( &self, ) -> Result<Response<GetVerifiedSendersDomainsResponse>, ClientError>

Domain Warn List.

This function performs a GET to the /verified_senders/domains endpoint.

This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure.

Domains listed as hard failures will not deliver mail when used as a Sender Identity due to the domain’s DMARC policy settings.

For example, using a yahoo.com email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see Everything about DMARC.

Source

pub async fn get_verified_senders_steps_completed( &self, ) -> Result<Response<GetVerifiedSendersStepsCompletedResponse>, ClientError>

Completed Steps.

This function performs a GET to the /verified_senders/steps_completed endpoint.

This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account.

This endpoint returns boolean values, true and false, for Domain Authentication, domain_verified, and Single Sender Verification, sender_verified, for the account.

An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the “Authenticate a domain” endpoint.

Source

pub async fn get_verified_senders( &self, limit: f64, last_seen_id: f64, id: i64, ) -> Result<Response<GetVerifiedSendersResponse>, ClientError>

Get All Verified Senders.

This function performs a GET to the /verified_senders endpoint.

This endpoint allows you to retrieve all the Sender Identities associated with an account.

This endpoint will return both verified and unverified senders.

You can limit the number of results returned using the limit, lastSeenID, and id query string parameters.

  • limit allows you to specify an exact number of Sender Identities to return.
  • lastSeenID will return senders with an ID number occuring after the passed in ID. In other words, the lastSeenID provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account.
  • id will return information about only the Sender Identity passed in the request.

Parameters:

  • limit: f64 – The number of errors found while adding recipients.
  • last_seen_id: f64 – The number of errors found while adding recipients.
  • id: i64
Source

pub async fn post_verified_sender( &self, body: &VerifiedSenderRequestSchema, ) -> Result<Response<VerifiedSenderResponseSchema>, ClientError>

Create Verified Sender Request.

This function performs a POST to the /verified_senders endpoint.

This endpoint allows you to create a new Sender Identify.

Upon successful submission of a POST request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the from_email field. You must complete the verification process using the sent email to fully verify the sender.

If you need to resend the verification email, you can do so with the Resend Verified Sender Request, /resend/{id}, endpoint.

If you need to authenticate a domain rather than a Single Sender, see the Domain Authentication API.

Source

pub async fn get_verified_senders_verify_token( &self, token: &str, ) -> Result<Response<()>, ClientError>

Verify Sender Request.

This function performs a GET to the /verified_senders/verify/{token} endpoint.

This endpoint allows you to verify a sender requests.

The token is generated by SendGrid and included in a verification email delivered to the address that’s pending verification.

Source

pub async fn delete_verified_senders( &self, id: &str, ) -> Result<Response<Help>, ClientError>

Delete Verified Sender.

This function performs a DELETE to the /verified_senders/{id} endpoint.

This endpoint allows you to delete a Sender Identity.

Pass the id assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account.

You can retrieve the IDs associated with Sender Identities using the “Get All Verified Senders” endpoint.

Source

pub async fn patch_verified_senders( &self, id: &str, body: &VerifiedSenderRequestSchema, ) -> Result<Response<VerifiedSenderResponseSchema>, ClientError>

Edit Verified Sender.

This function performs a PATCH to the /verified_senders/{id} endpoint.

This endpoint allows you to update an existing Sender Identity.

Pass the id assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format.

You can retrieve the IDs associated with Sender Identities by passing a GET request to the Get All Verified Senders endpoint, /verified_senders.

Note: Unlike a PUT request, PATCH allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered.

Source

pub async fn post_verified_senders_resend( &self, id: &str, ) -> Result<Response<Help>, ClientError>

Resend Verified Sender Request.

This function performs a POST to the /verified_senders/resend/{id} endpoint.

This endpoint allows you to resend a verification email to a specified Sender Identity.

Passing the id assigned to a Sender Identity to this endpoint will resend a verification email to the from_address associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason.

You can retrieve the IDs associated with Sender Identities by passing a “Get All Verified Senders” endpoint.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,