# Bulk Email Verifier & Validator: Real SMTP Mailbox Check (`hanielazevedo/bulk-email-verifier`) Actor

Bulk email verifier and validator with a real SMTP mailbox check that never sends email: valid, invalid, risky, catch-all or unknown, with the reason for each. Detects disposable, role and free-provider addresses and typos. Unknown results, duplicates and syntax rejects are free.

- **URL**: https://apify.com/hanielazevedo/bulk-email-verifier.md
- **Developed by:** [Haniel Azevedo](https://apify.com/hanielazevedo) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 email verifieds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bulk Email Verifier

Clean your email list before you send. Paste addresses (or point at a dataset from a lead-scraping Actor) and get one
honest verdict per unique address, **with the reason behind it**:

| Status | Meaning | Charged? |
|---|---|---|
| `valid` | The recipient's mail server accepted this mailbox **and** rejected a random address on the same domain. | yes |
| `invalid` | Bad domain (does not exist, has no mail server, or publishes a "null MX"), or the server said the mailbox does not exist. | yes |
| `risky` | Disposable/temporary email domain, mailbox full, no-reply address, accepted by a server whose catch-all test was inconclusive, or (optional) a role address. | yes |
| `catch-all` | The domain accepts **any** address, including a random one we generated, so the mailbox cannot be confirmed. Never reported as `valid`. | yes |
| `unknown` | We could not get a definitive answer (greylisting after a retry, the server blocks verification, timeouts, DNS errors). | **free** |

Also free: duplicates (case-insensitive, removed before checking) and addresses rejected on syntax alone.

### What is checked

1. **Syntax** – RFC-style checks on the local part and the domain (length limits, dots, allowed characters,
   international domains converted to punycode). `Name <user@example.com>` and `mailto:` links are accepted.
2. **Typo suggestions** – `john@gmial.com` gets `didYouMean: john@gmail.com`.
3. **Domain & MX** – public DNS: MX records, RFC 7505 null MX, implicit MX (A/AAAA fallback), non-existent domains.
   Every domain is looked up once per run, no matter how many addresses it has.
4. **Disposable domains** – an openly licensed (CC0) list of ~10,000 disposable/temporary email domains
   ([disposable-email-domains](https://github.com/disposable-email-domains/disposable-email-domains)), including subdomains.
5. **Role accounts** – `info@`, `sales@`, `support@`, `noreply@` … are flagged with `isRole` / `isNoReply`.
6. **Free providers** – Gmail, Outlook, Yahoo, iCloud, Proton … flagged with `isFreeProvider`.
7. **Mailbox (SMTP) check** – the Actor opens a normal SMTP conversation with the domain's mail server, asks whether the
   recipient exists (`RCPT TO`), and then says goodbye (`QUIT`). **No email is ever sent** – the conversation ends before
   any message content (`DATA`) would be transmitted. A random, non-existent address on the same domain is probed once
   per domain to detect catch-all servers.

The SMTP check is polite: one connection at a time per mail server (max 2), a minimum interval between connections,
batches of up to 20 recipients per connection, timeouts, and a single delayed retry for greylisting servers.
Addresses we cannot resolve definitively are `unknown` and cost nothing.

### Input

```json
{
  "emails": ["info@microsoft.com", "support@github.com", "press@apple.com", "not-an-email",
             "hello@this-domain-does-not-exist-12345.com"],
  "treatRoleAsRisky": false
}
```

| Field | Description |
|---|---|
| `emails` | List of addresses (one per line). |
| `inputDatasetId` / `emailField` | Optional: verify addresses from an existing dataset (field `email` by default; strings or arrays). |
| `treatRoleAsRisky` | Downgrade otherwise valid role addresses (info@, sales@ …) to `risky`. Default off; `isRole` is always set. |
| `checkSmtp` | Mailbox-level check (default on). When off or unavailable, deliverable-looking addresses are `unknown` (free). |
| `greylistRetrySecs` | Delay before the single retry for "try again later" answers (default 45, 0 = no retry). |
| `maxEmails` | Optional cap on unique addresses per run. |

### Output

One dataset row per unique address. Example:

```json
{
  "email": "jane.doe@example.com",
  "input": "Jane Doe <jane.doe@example.com>",
  "status": "catch-all",
  "reason": "domain_accepts_any_address",
  "reasonDetail": "Catch-all domain: the server accepted a random, non-existent address, so the mailbox cannot be confirmed.",
  "safeToSend": false,
  "domain": "example.com",
  "isRole": false,
  "isNoReply": false,
  "isDisposable": false,
  "isFreeProvider": false,
  "isCatchAll": true,
  "mxFound": true,
  "mxHosts": ["mx1.example.com", "mx2.example.com"],
  "smtpChecked": true,
  "smtpCode": 250,
  "smtpMessage": "2.1.5 OK",
  "didYouMean": null,
  "charged": true,
  "inputIndex": 0,
  "checkedAt": "2026-11-02T15:04:05Z"
}
```

Possible `reason` values: `mailbox_accepted`, `mailbox_does_not_exist`, `invalid_syntax` (+ `syntaxError`),
`domain_does_not_exist`, `domain_does_not_accept_email`, `domain_has_no_mail_server`, `disposable_domain`,
`domain_accepts_any_address`, `accepted_but_catch_all_check_inconclusive`, `mailbox_full`, `no_reply_address`,
`role_account`, `temporary_failure_or_greylisting`, `verification_blocked_by_receiver`, `smtp_unreachable`,
`server_did_not_confirm`, `smtp_check_not_configured`, `dns_lookup_failed`, `max_charge_reached`.

Rows are written per domain as soon as it is finished, so the order can differ from your input; `inputIndex` points
back to the position in your list. Export as CSV, Excel or JSON from the dataset tab. A run summary (counts per
status, duplicates removed, charged events) is saved to the key-value store as `OUTPUT`.

### Pricing

Pay per event, per verified address, plus Apify's standard $0.00005 run start:

| Your Apify discount tier | Price per 1,000 verified addresses |
|---|---|
| Free plan | $1.50 |
| Bronze | $0.80 |
| Silver | $0.70 |
| Gold and above | $0.60 |

`unknown` results, duplicates and syntax-only rejections are free. If you set a maximum charge for the run, the Actor
stops before exceeding it and marks the rest as `not_processed` (free).

### Responsible use

- Verify only lists you collected or are entitled to process; you remain the data controller.
- The Actor never sends email and does not store your addresses outside your own Apify run storage.
- Apify blocks the mail port, so the mailbox check runs through a verification server operated by the Actor's
  author. Addresses pass through it in memory to open the SMTP conversation; they are not logged or saved there.
- Some large providers deliberately hide mailbox existence. In those cases you will see `catch-all` or `unknown`
  instead of a guess – that is by design.

### FAQ

**Why is a Gmail/Outlook address `unknown`?** Some providers throttle or refuse verification from unknown senders.
We report that honestly instead of guessing, and you are not charged.

**Is `catch-all` bad?** Not necessarily – many company domains accept everything. It just means nobody can confirm the
mailbox without sending a real email. Send to them in smaller batches.

# Actor input Schema

## `emails` (type: `array`):

The addresses you want to verify, one per line. Duplicates (case-insensitive) are removed automatically and never charged. Formats like "Name <user@example.com>" and mailto: links are accepted.

## `inputDatasetId` (type: `string`):

Optional. Verify addresses from an existing dataset (for example the output of a lead-scraping Actor). Combined with the list above.

## `emailField` (type: `string`):

Name of the field that holds the address in each dataset item. String or array of strings.

## `treatRoleAsRisky` (type: `boolean`):

Role / shared mailboxes (info@, sales@, support@ ...) are always flagged with isRole. Turn this on to also downgrade otherwise valid role addresses to "risky".

## `checkSmtp` (type: `boolean`):

Ask the domain's mail server whether the mailbox exists (RCPT TO handshake, then QUIT; no email is ever sent). When off or unavailable, deliverable-looking addresses are returned as "unknown" and are free.

## `greylistRetrySecs` (type: `integer`):

Servers that answer "try again later" are retried once after this delay. 0 disables the retry; those addresses are then "unknown" (free).

## `maxEmails` (type: `integer`):

Optional cap on unique addresses processed in this run. 0 = no cap (hard limit 200,000).

## `domainConcurrency` (type: `integer`):

How many domains are checked at the same time. Each mail server is still contacted politely (rate-limited per server).

## Actor input object example

```json
{
  "emails": [
    "info@microsoft.com",
    "support@github.com",
    "press@apple.com",
    "not-an-email",
    "hello@this-domain-does-not-exist-12345.com"
  ],
  "emailField": "email",
  "treatRoleAsRisky": false,
  "checkSmtp": true,
  "greylistRetrySecs": 45,
  "maxEmails": 0,
  "domainConcurrency": 20
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "emails": [
        "info@microsoft.com",
        "support@github.com",
        "press@apple.com",
        "not-an-email",
        "hello@this-domain-does-not-exist-12345.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hanielazevedo/bulk-email-verifier").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "emails": [
        "info@microsoft.com",
        "support@github.com",
        "press@apple.com",
        "not-an-email",
        "hello@this-domain-does-not-exist-12345.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hanielazevedo/bulk-email-verifier").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "emails": [
    "info@microsoft.com",
    "support@github.com",
    "press@apple.com",
    "not-an-email",
    "hello@this-domain-does-not-exist-12345.com"
  ]
}' |
apify call hanielazevedo/bulk-email-verifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hanielazevedo/bulk-email-verifier"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KPTIdYuliYGMCLhMh/builds/pULf9AwYaYUInkCI2/openapi.json
