Struct check_if_email_exists::CheckEmailInput
source · [−]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
sourceimpl CheckEmailInput
impl CheckEmailInput
sourcepub fn new(to_emails: Vec<String>) -> CheckEmailInput
pub fn new(to_emails: Vec<String>) -> CheckEmailInput
Create a new CheckEmailInput.
sourcepub fn from_email(&mut self, email: String) -> &mut CheckEmailInput
👎 Deprecated since 0.8.24: Please use set_from_email instead
pub fn from_email(&mut self, email: String) -> &mut CheckEmailInput
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.
sourcepub fn set_from_email(&mut self, email: String) -> &mut CheckEmailInput
pub fn set_from_email(&mut self, email: String) -> &mut CheckEmailInput
Set the email to use in the MAIL FROM:
SMTP command. Defaults to
user@example.org
if not explicitly set.
sourcepub fn hello_name(&mut self, name: String) -> &mut CheckEmailInput
👎 Deprecated since 0.8.24: Please use set_hello_name instead
pub fn hello_name(&mut self, name: String) -> &mut CheckEmailInput
Please use set_hello_name instead
Set the name to use in the EHLO:
SMTP command. Defaults to localhost
if not explicitly set.
sourcepub fn set_hello_name(&mut self, name: String) -> &mut CheckEmailInput
pub fn set_hello_name(&mut self, name: String) -> &mut CheckEmailInput
Set the name to use in the EHLO:
SMTP command. Defaults to localhost
if not explicitly set.
sourcepub fn proxy(
&mut self,
proxy_host: String,
proxy_port: u16
) -> &mut CheckEmailInput
👎 Deprecated since 0.8.24: Please use set_proxy instead
pub fn proxy(
&mut self,
proxy_host: String,
proxy_port: u16
) -> &mut CheckEmailInput
Please use set_proxy instead
Use the specified SOCK5 proxy to perform email verification.
sourcepub fn set_proxy(&mut self, proxy: CheckEmailInputProxy) -> &mut CheckEmailInput
pub fn set_proxy(&mut self, proxy: CheckEmailInputProxy) -> &mut CheckEmailInput
Use the specified SOCK5 proxy to perform email verification.
sourcepub fn set_retries(&mut self, retries: usize) -> &mut CheckEmailInput
pub fn set_retries(&mut self, retries: usize) -> &mut CheckEmailInput
Set the number of SMTP retries to do.
sourcepub fn smtp_timeout(&mut self, duration: Duration) -> &mut CheckEmailInput
👎 Deprecated since 0.8.24: Please use set_smtp_timeout instead
pub fn smtp_timeout(&mut self, duration: Duration) -> &mut CheckEmailInput
Please use set_smtp_timeout instead
Add optional timeout for the SMTP verification step.
sourcepub fn set_smtp_port(&mut self, port: u16) -> &mut CheckEmailInput
pub fn set_smtp_port(&mut self, port: u16) -> &mut CheckEmailInput
Change the SMTP port.
sourcepub fn set_smtp_security(
&mut self,
smtp_security: SmtpSecurity
) -> &mut CheckEmailInput
pub fn set_smtp_security(
&mut self,
smtp_security: SmtpSecurity
) -> &mut CheckEmailInput
Set the SMTP client security to use for TLS.
sourcepub fn set_smtp_timeout(&mut self, duration: Duration) -> &mut CheckEmailInput
pub fn set_smtp_timeout(&mut self, duration: Duration) -> &mut CheckEmailInput
Add optional timeout for the SMTP verification step.
sourcepub fn yahoo_use_api(&mut self, use_api: bool) -> &mut CheckEmailInput
👎 Deprecated since 0.8.24: Please use set_yahoo_use_api instead
pub fn yahoo_use_api(&mut self, use_api: bool) -> &mut CheckEmailInput
Please use set_yahoo_use_api instead
Set whether to use Yahoo’s API or connecting directly to their SMTP servers. Defaults to true.
sourcepub fn set_yahoo_use_api(&mut self, use_api: bool) -> &mut CheckEmailInput
pub fn set_yahoo_use_api(&mut self, use_api: bool) -> &mut CheckEmailInput
Set whether to use Yahoo’s API or connecting directly to their SMTP servers. Defaults to true.
Trait Implementations
sourceimpl Clone for CheckEmailInput
impl Clone for CheckEmailInput
sourcefn clone(&self) -> CheckEmailInput
fn clone(&self) -> CheckEmailInput
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CheckEmailInput
impl Debug for CheckEmailInput
sourceimpl Default for CheckEmailInput
impl Default for CheckEmailInput
sourceimpl<'de> Deserialize<'de> for CheckEmailInput
impl<'de> Deserialize<'de> for CheckEmailInput
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for CheckEmailInput
impl Serialize for CheckEmailInput
Auto Trait Implementations
impl RefUnwindSafe for CheckEmailInput
impl Send for CheckEmailInput
impl Sync for CheckEmailInput
impl Unpin for CheckEmailInput
impl UnwindSafe for CheckEmailInput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more