reacherhq / check-if-email-exists

Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.
https://reacher.email
Other
4.27k stars 328 forks source link

Add `input.debug = true` for debugging purposes #1349

Open amaury1093 opened 10 months ago

amaury1093 commented 10 months ago

Feature Request

Add an optional debug field in the request, which, if true, will output debug info in the output.

Problem

A lot of people wonder why an email verification fails. Add debugging info via the API will save debugging time.

Solution

{
   "to_email": "test@gmail.com",
+  "debug": true
}

Which, if set, will also add a new debug field in the response, which gives additional info about how Reacher performed the verification. Things like:

Example:

{
 "is_reachable": "unknown",
  // -- snip --
 "debug": {
   "time_elapsed": 10539, // in ms
   "smtp": {
     "method": "smtp", // or "api" or "headless"
     // fields below will depend on "method" above
     "smtp_connections": 2,
     "logs": [
       ">> STARTTLS<CRLF>",
       "<< 220 TLS go ahead<CRLF>"
       // -- snip --
     ]
   }
}

Notes

For new contributors: This is a good issue to get to know the codebase. It's also possible to do this feature piecewise: a first good step might be to simply add the time_elapsed field