Does validateSmtp send an email?
No. validateSmtp performs a TCP connectivity check on port 25 only — it does not send mail or run full SMTP conversation validation.
Look up mail exchange records sorted by priority, optionally resolve MX host IPs, parse SPF policies, and test SMTP port 25 connectivity — via GET or POST, single or batch.
Why MX Lookup API
/api/v1/mx-lookup
GET for quick queries, POST for structured batch jobs. Per-domain DNS failures stay in the data array.
| Parameter | Type | Default | Description |
|---|---|---|---|
| domains | string | array | — | Required. Single domain, comma-separated (GET), or array (POST). Max 50. |
| resolveIps | boolean | true | Resolve A/AAAA for each MX exchange host. |
| validateSmtp | boolean | false | TCP port 25 connectivity check per MX host. |
| includeSpf | boolean | false | Parse SPF record from TXT when present. |
Quick GET with SPF enabled, or POST a batch with full control over enrichment flags.
GET https://datpaq.com/api/v1/mx-lookup?domains=gmail.com&includeSpf=true&resolveIps=true
POST https://datpaq.com/api/v1/mx-lookup
Content-Type: application/json
{
"domains": ["gmail.com", "protonmail.com"],
"resolveIps": true,
"validateSmtp": false,
"includeSpf": true
}Error reference
Batch MX lookups continue when one domain fails DNS — check data[].error for per-domain issues.
{
"domain": "nonexistentdomainthatdoesnotexist12345.com",
"mxRecords": [],
"error": "DNS lookup failed"
}FAQ
No. validateSmtp performs a TCP connectivity check on port 25 only — it does not send mail or run full SMTP conversation validation.
When enabled, the API parses SPF records from TXT records and returns the raw record, include mechanisms, and the all mechanism (e.g. ~all).
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.
Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.
Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.
MX records, SPF policies, and SMTP reachability in one API — built for deliverability troubleshooting and email verification flows.