Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.
Rust emailemail-validationemail-validation-apiemail-verificationemail-verification-apiemail-verifierhacktoberfest
fix: Only do headless for non-365 hotmail emails
Amaury1c52bdc75fb2
diff --git a/core/src/smtp/mod.rs b/core/src/smtp/mod.rsindex ad6ed493..42751af2 100644--- a/core/src/smtp/mod.rs+++ b/core/src/smtp/mod.rs@@ -114,35 +114,37 @@ pub async fn check_smtp(let webdriver_addr = env::var("RCH_WEBDRIVER_ADDR");if is_hotmail(&host) {- match (&input.hotmail_verif_method, webdriver_addr) {- (HotmailVerifMethod::OneDriveApi, _) => {- if is_microsoft365(&host) {- match outlook::microsoft365::check_microsoft365_api(to_email, input).await {- Ok(Some(smtp_details)) => {- return {- (- Ok(smtp_details),- SmtpDebug {- verif_method: VerifMethod::Api,- },- )- }- }- // Continue in the event of an error/ambiguous result.- Err(err) => {- return (- Err(err.into()),+ match (+ &input.hotmail_verif_method,+ webdriver_addr,+ is_microsoft365(&host),+ ) {+ (HotmailVerifMethod::OneDriveApi, _, true) => {+ match outlook::microsoft365::check_microsoft365_api(to_email, input).await {+ Ok(Some(smtp_details)) => {+ return {+ (+ Ok(smtp_details),SmtpDebug {verif_method: VerifMethod::Api,},- );+ )}- _ => {}}+ // Continue in the event of an error/ambiguous result.+ Err(err) => {+ return (+ Err(err.into()),+ SmtpDebug {+ verif_method: VerifMethod::Api,+ },+ );+ }+ _ => {}}}#[cfg(feature = "headless")]- (HotmailVerifMethod::Headless, Ok(a)) => {+ (HotmailVerifMethod::Headless, Ok(a), false) => {return (outlook::headless::check_password_recovery(to_email.to_string().as_str(), &a).await