pub struct SenderVerification {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl SenderVerification
impl SenderVerification
Sourcepub async fn get_verified_senders_domains(
&self,
) -> Result<Response<GetVerifiedSendersDomainsResponse>, ClientError>
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.
Sourcepub async fn get_verified_senders_steps_completed(
&self,
) -> Result<Response<GetVerifiedSendersStepsCompletedResponse>, ClientError>
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.
Sourcepub async fn get_verified_senders(
&self,
limit: f64,
last_seen_id: f64,
id: i64,
) -> Result<Response<GetVerifiedSendersResponse>, ClientError>
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, thelastSeenID
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
Sourcepub async fn post_verified_sender(
&self,
body: &VerifiedSenderRequestSchema,
) -> Result<Response<VerifiedSenderResponseSchema>, ClientError>
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.
Sourcepub async fn get_verified_senders_verify_token(
&self,
token: &str,
) -> Result<Response<()>, ClientError>
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.
Sourcepub async fn delete_verified_senders(
&self,
id: &str,
) -> Result<Response<Help>, ClientError>
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.
Sourcepub async fn patch_verified_senders(
&self,
id: &str,
body: &VerifiedSenderRequestSchema,
) -> Result<Response<VerifiedSenderResponseSchema>, ClientError>
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.
Sourcepub async fn post_verified_senders_resend(
&self,
id: &str,
) -> Result<Response<Help>, ClientError>
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.