diff --git a/core/src/smtp/mod.rs b/core/src/smtp/mod.rs index ad6ed493c..42751af2f 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