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: Don't check inputted email if catch-all (#714)
Amaury Martiny5129dd1374d3
diff --git a/Cargo.lock b/Cargo.lockindex c8df18b6..6c4a482f 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -333,7 +333,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"[[package]]name = "check-if-email-exists"-version = "0.8.14"+version = "0.8.15"dependencies = ["async-smtp","async-std",@@ -353,7 +353,7 @@ dependencies = [[[package]]name = "check-if-email-exists-cli"-version = "0.8.14"+version = "0.8.15"dependencies = ["check-if-email-exists","clap",@@ -366,7 +366,7 @@ dependencies = [[[package]]name = "check-if-email-exists-test-suite"-version = "0.8.14"+version = "0.8.15"dependencies = ["check-if-email-exists","serde",diff --git a/Cargo.toml b/Cargo.tomlindex 6b2f36bd..f3f34094 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -1,6 +1,6 @@[package]name = "check-if-email-exists-cli"-version = "0.8.14"+version = "0.8.15"default-run = "check_if_email_exists"edition = "2018"license = "AGPL-3.0"diff --git a/Dockerfile b/Dockerfileindex d5936065..b7932dac 100644--- a/Dockerfile+++ b/Dockerfile@@ -3,7 +3,7 @@ FROM alpine# `ciee` stands for check-if-email-existsWORKDIR /ciee# Fetch latest version-ENV CIEE_VERSION 0.8.14+ENV CIEE_VERSION 0.8.15# Install needed librariesRUN apk update && \diff --git a/README.md b/README.mdindex c75e5d55..0cbcbbfb 100644--- a/README.md+++ b/README.md@@ -98,7 +98,7 @@ Head to the [releases page](https://github.com/amaurymartiny/check-if-email-exis```> $ check_if_email_exists --help-check_if_email_exists 0.8.14+check_if_email_exists 0.8.15Check if an email address exists without sending any email.USAGE:diff --git a/core/Cargo.toml b/core/Cargo.tomlindex 1f7bc880..ae1038f5 100644--- a/core/Cargo.toml+++ b/core/Cargo.toml@@ -1,6 +1,6 @@[package]name = "check-if-email-exists"-version = "0.8.14"+version = "0.8.15"authors = ["Amaury Martiny <[email protected]>"]categories = ["email"]description = "Check if an email address exists without sending any email"diff --git a/core/src/smtp/mod.rs b/core/src/smtp/mod.rsindex b3802606..da5d281f 100644--- a/core/src/smtp/mod.rs+++ b/core/src/smtp/mod.rs@@ -203,7 +203,8 @@ async fn email_deliverable(let message = message.to_lowercase();let is_deliverable = message.contains("2.1.5") ||// 250 Recipient address accepted- message.contains("recipient address accepted");+ // 250 Accepted+ message.contains("accepted");Ok(Deliverability {has_full_inbox: false,is_deliverable,@@ -357,7 +358,15 @@ async fn create_smtp_future(let is_catch_all = smtp_is_catch_all(&mut smtp_client, domain).await.unwrap_or(false);- let deliverability = email_deliverable(&mut smtp_client, to_email).await?;+ let deliverability = if is_catch_all {+ Deliverability {+ has_full_inbox: false,+ is_deliverable: true,+ is_disabled: false,+ }+ } else {+ email_deliverable(&mut smtp_client, to_email).await?+ };smtp_client.close().await?;diff --git a/test_suite/Cargo.toml b/test_suite/Cargo.tomlindex 68b04ae1..3f6f3901 100644--- a/test_suite/Cargo.toml+++ b/test_suite/Cargo.toml@@ -1,6 +1,6 @@[package]name = "check-if-email-exists-test-suite"-version = "0.8.14"+version = "0.8.15"edition = "2018"publish = false