Network & DNS
/api/v1/smtp-connectivityPacketFlo SMTP Connectivity Test API
Test whether an SMTP mail server is reachable from PacketFlo's servers. Checks TCP connection, SMTP greeting, EHLO capabilities, and STARTTLS / implicit TLS handshake.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | Yes | Target mail server hostname or IP address. |
port | number | No | SMTP port to test (typically 25, 465, 587, or 2525). Defaults to 25. |
mode | string | No | TLS mode: "plain", "starttls", or "tls" (implicit TLS). Defaults to "plain". |
SMTP Submission with STARTTLS (Port 587)
Standard mail submission port with EHLO capability exchange and STARTTLS upgrade.
Example request
curl "https://packetflo.io/api/v1/smtp-connectivity?host=smtp.gmail.com&port=587&mode=starttls&api_key=YOUR_API_KEY"
Example response
{ "ok": true, "data": { "host": "smtp.gmail.com", "port": 587, "mode": "starttls", "resolvedIps": ["192.179.20.108"], "primaryIp": "192.179.20.108", "dns": { "resolved": true, "ips": ["192.179.20.108"], "error": null }, "tcp": { "connected": true, "connectTimeMs": 28, "error": null }, "smtp": { "greetingReceived": true, "statusCode": 220, "banner": "220 smtp.gmail.com ESMTP ... - gsmtp", "greetingTimeMs": 35, "error": null }, "ehlo": { "sent": true, "accepted": true, "statusCode": 250, "response": "250-smtp.gmail.com at your service...\n250-STARTTLS", "capabilities": ["SIZE 35882577", "8BITMIME", "STARTTLS", "PIPELINING"], "error": null }, "starttls": { "advertised": true, "attempted": true, "ready": true, "error": null }, "tls": { "handshakeSuccessful": true, "handshakeTimeMs": 42, "info": { "version": "TLSv1.3", "cipher": "TLS_AES_256_GCM_SHA384", "cert": { "subject": "smtp.gmail.com", "issuer": "Google Trust Services", "validFrom": "Sep 10 19:23:20 2026 GMT", "validTo": "Dec 3 19:23:19 2026 GMT", "daysRemaining": 58, "trusted": true, "authorized": true } }, "error": null }, "timing": { "dnsMs": 12, "tcpConnectMs": 28, "totalMs": 117 }, "status": "ok", "headline": "SMTP connection and STARTTLS healthy", "summary": "SMTP greeting, EHLO capabilities, and STARTTLS handshake (TLSv1.3) succeeded.", "errors": [] }, "meta": { "tool": "smtp-connectivity", "version": "v1" } }
SMTPS Implicit TLS (Port 465)
Direct TLS handshake before SMTP command transmission.
Example request
curl "https://packetflo.io/api/v1/smtp-connectivity?host=smtp.gmail.com&port=465&mode=tls&api_key=YOUR_API_KEY"
Example response
{ "ok": true, "data": { "host": "smtp.gmail.com", "port": 465, "mode": "tls", "resolvedIps": ["192.179.20.108"], "primaryIp": "192.179.20.108", "dns": { "resolved": true, "ips": ["192.179.20.108"], "error": null }, "tcp": { "connected": true, "connectTimeMs": 35, "error": null }, "smtp": { "greetingReceived": true, "statusCode": 220, "banner": "220 smtp.gmail.com ESMTP ... - gsmtp", "greetingTimeMs": 40, "error": null }, "ehlo": { "sent": true, "accepted": true, "statusCode": 250, "response": "250-smtp.gmail.com at your service", "capabilities": ["SIZE 35882577", "8BITMIME", "AUTH LOGIN PLAIN", "PIPELINING"], "error": null }, "starttls": { "advertised": false, "attempted": false, "ready": false, "error": null }, "tls": { "handshakeSuccessful": true, "handshakeTimeMs": 35, "info": { "version": "TLSv1.3", "cipher": "TLS_AES_256_GCM_SHA384", "cert": { "subject": "smtp.gmail.com", "issuer": "Google Trust Services", "validFrom": "Sep 10 19:23:20 2026 GMT", "validTo": "Dec 3 19:23:19 2026 GMT", "daysRemaining": 58, "trusted": true, "authorized": true } }, "error": null }, "timing": { "dnsMs": 10, "tcpConnectMs": 35, "totalMs": 85 }, "status": "ok", "headline": "SMTPS connection healthy", "summary": "Implicit TLS handshake succeeded (TLSv1.3) and SMTP banner was received.", "errors": [] }, "meta": { "tool": "smtp-connectivity", "version": "v1" } }
Reading the result
status: "ok" indicates the server is reachable and successfully answered the requested SMTP protocol handshake. warn indicates partial success (such as STARTTLS unsupported), and error indicates a network, greeting, or TLS failure.
Response fields
| Field | What it tells you |
|---|---|
host / port / mode | Target mail server, tested TCP port, and TLS mode (plain, starttls, or tls). |
resolvedIps / primaryIp | DNS addresses resolved and the target IP connected to. |
tcp.connected / tcp.connectTimeMs | TCP connection outcome and socket connect latency. |
smtp.statusCode / smtp.banner | Initial SMTP server greeting status (normally 220) and raw greeting string. |
ehlo.accepted / ehlo.capabilities | EHLO response status and list of advertised SMTP extensions (STARTTLS, SIZE, PIPELINING, AUTH, etc.). |
starttls.advertised / starttls.ready | Whether STARTTLS was found in EHLO capabilities and whether the server accepted the STARTTLS command. |
tls.handshakeSuccessful / tls.info | TLS protocol version, negotiated cipher, and presented certificate summary. |
Scope and limits
Initiates a passive diagnostic TCP connection from PacketFlo's server. Does not authenticate, does not send email messages, and does not test mailbox delivery or spam filtering.
Authentication and errors
Send your key in the x-api-key header, or the supported api_key query parameter. Each request uses 2 credits from the key's shared 300-credit rolling 24-hour budget. Credits are charged before parameter validation. Successful responses and quota errors include usage headers; GET and OPTIONS support CORS.
| API status | Meaning |
|---|---|
200 | The diagnostic returned a result in data, with ok: true and version information in meta. Read the diagnostic fields to determine the target's condition. |
400 | Invalid or blocked input, or a lookup/check failure that could not be returned as a diagnostic result. Read error for details. |
401 | Missing, invalid or revoked API key. |
429 | The request would exceed the key's available credit budget. |