diff --git a/backend/openapi.json b/backend/openapi.json index 87d9f8775..6566ed1d9 100644 --- a/backend/openapi.json +++ b/backend/openapi.json @@ -306,6 +306,25 @@ "enum": ["invalid", "unknown", "safe", "risky"], "description": "An enum to describe how confident we are that the recipient address is real: `safe`, `risky`, `invalid` and `unknown`. Check our FAQ to know the meanings of the 4 possibilities: https://help.reacher.email/email-attributes-inside-json." }, + "YahooVerifyMethod": { + "type": "string", + "title": "YahooVerifyMethod", + "enum": ["Api", "Headless", "Smtp"], + "description": "An enum to describe how we verify Yahoo emails." + }, + "HotmailVerifyMethod": { + "type": "string", + "title": "HotmailVerifyMethod", + "enum": ["Api", "Headless", "Smtp"], + "description": "An enum to describe how we verify Hotmail emails." + }, + "GmailVerifyMethod": { + "type": "string", + "title": "GmailVerifyMethod", + "enum": ["Api", "Smtp"], + "description": "An enum to describe how we verify Gmail emails.", + "x-internal": false + }, "CheckEmailInput": { "title": "CheckEmailInput", "type": "object", @@ -330,30 +349,19 @@ "type": "number", "description": "SMTP port to use for email validation. Generally, ports 25, 465, 587 and 2525 are used." }, - "yahoo_use_api": { - "type": "boolean", - "description": "For Yahoo email addresses, use Yahoo's API instead of connecting directly to their SMTP servers." + "yahoo_verify_method": { + "$ref": "#/components/schemas/YahooVerifyMethod" }, - "yahoo_use_headless": { - "type": "boolean", - "description": "For Yahoo email addresses, use Yahoo's account recovery page instead of connecting directly to their SMTP servers." - }, - "gmail_use_api": { - "type": "boolean", - "description": "For Gmail email addresses, use Gmail's API instead of connecting directly to their SMTP servers." + "gmail_verify_method": { + "$ref": "#/components/schemas/GmailVerifyMethod" }, - "microsoft365_use_api": { - "type": "boolean", - "description": "For Microsoft 365 email addresses, use OneDrive's API instead of connecting directly to their SMTP servers." + "hotmail_verify_method": { + "$ref": "#/components/schemas/HotmailVerifyMethod" }, "check_gravatar": { "type": "boolean", "description": "Whether to check if a gravatar image is existing for the given email." }, - "hotmail_use_headless": { - "type": "boolean", - "description": "For Hotmail/Outlook email addresses, use a headless navigator connecting to the password recovery page instead of the SMTP server. This assumes you have a WebDriver compatible process running at the address provided by the environment variable `RCH_WEBDRIVER_ADDR`, usually http://localhost:9515. We recommend running chromedriver (and not geckodriver) as it allows parallel requests." - }, "retries": { "type": "number", "default": 2, diff --git a/cli/README.md b/cli/README.md index d11a9a635..dd4d1ae00 100644 --- a/cli/README.md +++ b/cli/README.md @@ -26,17 +26,29 @@ ARGS: OPTIONS: --check-gravatar - Whether to check for an existing gravatar image [env: CHECK_GRAVATAR=] [default: false] + Whether to check if a gravatar image is existing for the given email [env: + CHECK_GRAVATAR=] [default: false] --from-email The email to use in the `MAIL FROM:` SMTP command [env: FROM_EMAIL=] [default: - user@example.org] + reacher.email@gmail.com] + + --gmail-verify-method + Select how to verify Gmail email addresses: Api or Smtp [env: GMAIL_VERIFY_METHOD=] + [default: Smtp] -h, --help Print help information + --haveibeenpwned-api-key + HaveIBeenPnwed API key, ignore if not provided [env: HAVEIBEENPWNED_API_KEY=] + --hello-name - The name to use in the `EHLO:` SMTP command [env: HELLO_NAME=] [default: localhost] + The name to use in the `EHLO:` SMTP command [env: HELLO_NAME=] [default: gmail.com] + + --hotmail-verify-method + Select how to verify Hotmail email addresses: Api, Headless or Smtp [env: + HOTMAIL_VERIFY_METHOD=] [default: Headless] --proxy-host Use the specified SOCKS5 proxy host to perform email verification [env: PROXY_HOST=] @@ -59,13 +71,9 @@ OPTIONS: -V, --version Print version information - --yahoo-use-api - For Yahoo email addresses, use Yahoo's API instead of connecting directly to their SMTP - servers [env: YAHOO_USE_API=] [default: true] - - --gmail-use-api - For Gmail email addresses, use Gmail's API instead of connecting directly to their SMTP - servers [env: GMAIL_USE_API=] [default: false] + --yahoo-verify-method + Select how to verify Yahoo email addresses: Api, Headless or Smtp [env: + YAHOO_VERIFY_METHOD=] [default: Headless] ``` **💡 PRO TIP:** To show debug logs when running the binary, run: diff --git a/cli/src/main.rs b/cli/src/main.rs index 0a2a45009..d7fd9cf49 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -56,18 +56,15 @@ pub struct Cli { #[clap(long, env, default_value = "25")] pub smtp_port: u16, - /// Select how to verify Yahoo email addresses: using Yahoo's API, a - /// headless navigator, or connecting directly to their SMTP servers. + /// Select how to verify Yahoo email addresses: Api, Headless or Smtp. #[clap(long, env, default_value = "Headless", parse(try_from_str))] pub yahoo_verify_method: YahooVerifyMethod, - /// Select how to verify Gmail email addresses: using Yahoo's API, or - /// connecting directly to their SMTP servers. + /// Select how to verify Gmail email addresses: Api or Smtp. #[clap(long, env, default_value = "Smtp", parse(try_from_str))] pub gmail_verify_method: GmailVerifyMethod, - /// Select how to verify Hotmail email addresses: using Yahoo's API, a - /// headless navigator, or connecting directly to their SMTP servers. + /// Select how to verify Hotmail email addresses: Api, Headless or Smtp. #[clap(long, env, default_value = "Headless", parse(try_from_str))] pub hotmail_verify_method: HotmailVerifyMethod,