pub struct CheckEmailInput {
    pub to_emails: Vec<String>,
    pub from_email: String,
    pub hello_name: String,
    pub proxy: Option<CheckEmailInputProxy>,
    pub smtp_port: u16,
    pub smtp_timeout: Option<Duration>,
    pub yahoo_use_api: bool,
    pub retries: usize,
    pub smtp_security: SmtpSecurity,
}
Expand description

Builder pattern for the input argument into the main email_exists function.

Fields

to_emails: Vec<String>

The email to validate.

from_email: String

Email to use in the MAIL FROM: SMTP command.

Defaults to “user@example.org”.

hello_name: String

Name to use in the EHLO: SMTP command.

Defaults to “localhost” (note: “localhost” is not a FQDN).

proxy: Option<CheckEmailInputProxy>

Perform the email verification via the specified SOCK5 proxy. The usage of a proxy is optional.

smtp_port: u16

SMTP port to use for email validation. Generally, ports 25, 465, 587 and 2525 are used.

Defaults to 25.

smtp_timeout: Option<Duration>

Add optional timeout for the SMTP verification step.

yahoo_use_api: bool

For Yahoo email addresses, use Yahoo’s API instead of connecting directly to their SMTP servers.

Defaults to true.

retries: usize

Number of retries of SMTP connections to do.

Defaults to 2 to avoid greylisting.

smtp_security: SmtpSecurity

How to apply TLS to a SMTP client connection.

Defaults to Opportunistic.

Implementations

Create a new CheckEmailInput.

👎 Deprecated since 0.8.24:

Please use set_from_email instead

Set the email to use in the MAIL FROM: SMTP command. Defaults to user@example.org if not explicitly set.

Set the email to use in the MAIL FROM: SMTP command. Defaults to user@example.org if not explicitly set.

👎 Deprecated since 0.8.24:

Please use set_hello_name instead

Set the name to use in the EHLO: SMTP command. Defaults to localhost if not explicitly set.

Set the name to use in the EHLO: SMTP command. Defaults to localhost if not explicitly set.

👎 Deprecated since 0.8.24:

Please use set_proxy instead

Use the specified SOCK5 proxy to perform email verification.

Use the specified SOCK5 proxy to perform email verification.

Set the number of SMTP retries to do.

👎 Deprecated since 0.8.24:

Please use set_smtp_timeout instead

Add optional timeout for the SMTP verification step.

Change the SMTP port.

Set the SMTP client security to use for TLS.

Add optional timeout for the SMTP verification step.

👎 Deprecated since 0.8.24:

Please use set_yahoo_use_api instead

Set whether to use Yahoo’s API or connecting directly to their SMTP servers. Defaults to true.

Set whether to use Yahoo’s API or connecting directly to their SMTP servers. Defaults to true.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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