Skip to content

Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.

Update readme

Amaury Martiny6383be727bdc
diff --git a/README.md b/README.md
index f87819a5..43ccc1d6 100644
--- a/README.md
+++ b/README.md
@@ -1,41 +1,82 @@
-# check-if-email-exists
+# check_if_email_exists
-Check if an email address exists before sending the email. Uses Telnet.
+Check if an email address exists before sending the email.
## Why?
Many online services (https://hunter.io, http://verify-email.org, http://email-checker.net) offer this service for a paid fee. Here is an open-source alternative to those tools.
-## Usage
+## Download the binary
+
+Head to the [releases page](https://github.com/amaurymartiny/check_if_email_exists/releases) and download the binary for your platform.
-Make sure you have Telnet installed.
+## Usage
```bash
-./checkEmail.sh [email protected]
+USAGE:
+ check_if_email_exists [OPTIONS] <TO_EMAIL>
+
+FLAGS:
+ -h, --help Prints help information
+ -V, --version Prints version information
+
+OPTIONS:
+ --from <FROM_EMAIL> The from email to use in the Telnet connection (default: [email protected])
+
+ARGS:
+ <TO_EMAIL> The email to check
```
-Outputs `true` if email exists, `false` if it doesn't.
+## Legacy Bash Script
-Some mail providers validate sender's mail address before respond, so you should give a valid mail address as sender's mail.
+The 1st version of this tool was a simple bash script which made a telnet call. If you would like to use that simpler version, have a look at the [`legacy`](https://github.com/amaurymartiny/check_if_email_exists/tree/legacy) branch. The reasons for porting the bash script to the current codebase are explained [here](https://github.com/amaurymartiny/check_if_email_exists/issues/4).
-You can do this by one of the following methods:
+## Contribute
-```bash
-./checkEmail.sh [email protected]
-```
+### Install Rust
+
+check_if_email_exists requires **latest stable Rust version** to build.
+
+We recommend installing Rust through [rustup](https://www.rustup.rs/). If you don't already have `rustup`, you can install it like this:
-or
+- Linux:
+
+ ```bash
+ $ curl https://sh.rustup.rs -sSf | sh
+ ```
+
+ check_if_email_exists also requires `gcc`, `g++`, `libudev-dev`, `pkg-config`, `file`, `make`, and `cmake` packages to be installed.
+
+- OSX:
+
+ ```bash
+ $ curl https://sh.rustup.rs -sSf | sh
+ ```
+
+ `clang` is required. It comes with Xcode command line tools or can be installed with homebrew.
+
+- Windows
+ Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the `rustup` installer from
+ https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the `msvc` toolchain:
+ ```bash
+ $ rustup default stable-x86_64-pc-windows-msvc
+ ```
+
+### Clone the source code locally
```bash
-```
+# Download the code
+$ git clone https://github.com/amaurymartiny/check_if_email_exists
+$ cd check_if_email_exists
-## Notes
+# Make your modifications in src/
-This is really a draft version of the tool, for my personal uses. If someone wants to improve it (and it's easy), please submit a PR. The code is really easy, but needs some improvement to be deliverable to the public.
+# Build
+$ cargo build
-The main Bash script (checkEmail.sh) calls an expect script (expectTelnet.sh) to make a Telnet call to the host with ports 587, 465 and 25.
+# Run the binary
+$ ./target/debug/check_if_email_exists --help
+```
## License
diff --git a/src/bin/cli.yml b/src/bin/cli.yml
index bcb5bb06..bd3e4785 100644
--- a/src/bin/cli.yml
+++ b/src/bin/cli.yml
@@ -1,4 +1,4 @@
-name: check-if-email-exists
+name: check_if_email_exists
version: '0.1.0'
author: Amaury Martiny <[email protected]>
about: Check if an email address exists without sending any email.