Skip to content

// transactional email

Via API

SMTP2GO email verification with pingutil

SMTP2GO is often the relay behind apps, WordPress sites and devices that send mail with little logic of their own, so whatever address was typed gets used. Calling pingutil before POST /v3/email/send, or before the address is saved, stops invalid and disposable recipients early, and SMTP2GO's bounce webhooks flag the rest.

Where it connects: Your code before POST /v3/email/send, plus SMTP2GO webhooks (bounce events)

What goes wrong without it

  • Our app relays through SMTP2GO and we have no idea which customer addresses are dead until the bounce report shows up.
  • Contact forms on client sites send auto-replies to whatever address a bot typed in.
  • Every bounce counts against the monthly email allowance we pay for.

What you can do with SMTP2GO and pingutil

  • Verify before the API send

    Call /v1/verify before POST https://api.smtp2go.com/v3/email/send and skip invalid recipients.

  • Skip auto-replies to junk form submissions

    Run the fast lookup with skip_enrichment: true on the form address and skip the auto-reply when verdict.is_spam is true.

  • Flag hard bounces from webhooks

    SMTP2GO bounce webhook events say whether a bounce is hard or soft. Flag users on hard bounces and ask for a new address.

Set it up

  1. 1

    Store PINGUTIL_KEY with your SMTP2GO API key.

  2. 2

    Before sending, call pingutil /v1/verify (or /v1/lookup with skip_enrichment: true for form auto-replies).

  3. 3

    Skip invalid recipients and send the rest with POST https://api.smtp2go.com/v3/email/send and the X-Smtp2go-Api-Key header.

  4. 4

    Under Settings, Webhooks in SMTP2GO, add your endpoint for bounce events, optionally with an Authorization header.

  5. 5

    Flag users on hard bounces and verify any replacement address.

Python: verify, then send with the SMTP2GO API
import os
import requests


def verify(email: str):
    try:
        r = requests.post(
            "https://pingutil.com/v1/verify",
            headers={"Authorization": "Bearer " + os.environ["PINGUTIL_KEY"]},
            json={"email": email},
            timeout=10,
        )
        return r.json() if r.status_code == 200 else None
    except requests.RequestException:
        return None  # fail open


def send(to: str, subject: str, text: str) -> bool:
    v = verify(to)
    if v and v["status"] == "invalid":
        return False

    r = requests.post(
        "https://api.smtp2go.com/v3/email/send",
        headers={"X-Smtp2go-Api-Key": os.environ["SMTP2GO_API_KEY"]},
        json={
            "sender": "YourApp <hello@yourapp.com>",  # must be a verified sender
            "to": [to],
            "subject": subject,
            "text_body": text,
        },
        timeout=15,
    )
    return r.ok

What to do with each result

pingutil resultAction in SMTP2GO
status invalidSkip the SMTP2GO send; it would only bounce.
verdict.is_spam true (form auto-reply)Skip the auto-reply and mark the submission as spam.
status risky, reason accept_allSend; a bounce webhook will report it if it fails.
status unknownSend and keep the address flagged as unchecked.

Limits to plan for

  • If your app sends through SMTP2GO over plain SMTP with no code you control (a device or plugin), add the pingutil check where the address is collected instead, for example the form or signup handler.
  • SMTP2GO's send API takes up to 100 addresses in to, and the sender must be a verified sender on your account.
  • pingutil verifies 300 addresses a day (3,000 a month) per account. For high-volume form traffic, use the fast lookup for every submission and the mailbox check only for addresses you keep. Those are Free plan limits; Enterprise has custom limits.

SMTP2GO documentation

SMTP2GO is a trademark of its owner. This integration uses SMTP2GO's documented extension points; it is not an official SMTP2GO app.

Common questions

Can pingutil plug into the SMTP relay itself?
No. pingutil is a REST API your code calls. If you only use SMTP2GO as a relay, verify addresses where your app or form collects them.
Does verification send anything to the recipient?
No. The SMTP check stops at RCPT TO and no message is sent.

Stop bad addresses in SMTP2GO today

Sign in with your email, create an API key and paste it into the step above. Test on a few real addresses first: the live demo shows exactly what your SMTP2GO setup will receive.