Skip to content

// forms and surveys

Via API

EasyForm email verification with pingutil

EasyForm turns any HTML form into a backend with no server, so contact and newsletter forms on static sites start collecting addresses in minutes, typos and throwaways included. Its webhook integration posts each submission as signed JSON to your endpoint, where pingutil verifies the address before the lead reaches your CRM or inbox. EasyForm delivers webhooks asynchronously after it accepts the submission, so this filters what happens next rather than blocking the form.

Where it connects: EasyForm webhook integration (signed JSON POST with an X-EasyForm-Signature header), or its Mailazy contact sync

What goes wrong without it

  • The honeypot stops the dumb bots, but people still sign up to our newsletter form with throwaway addresses to get the download.
  • We reply to contact form messages from the notification email and half the replies to mistyped addresses bounce.
  • Every submission goes to the same inbox, and nobody can tell a lead from a company domain from a gmail.com tire-kicker.

What you can do with EasyForm and pingutil

  • Verify newsletter signups without writing code

    EasyForm can send every newsletter signup to Mailazy as a contact. With a pingutil key connected on Mailazy's Integrations page, Mailazy checks each new contact, moves invalid ones to Contacts, Invalid, and never emails them.

  • Filter contact form leads before the CRM

    Point an EasyForm webhook at a small function that verifies the email with pingutil and forwards only valid, risky and unknown results to your CRM or helpdesk, with the status attached.

  • Fix typos before someone replies

    When pingutil returns invalid with a did_you_mean suggestion, post the corrected address to your team so the reply goes to the inbox the visitor meant.

  • Route company inquiries to sales

    A fast /v1/lookup with skip_enrichment gives the category, so company-domain submissions go to sales and free webmail goes to the general inbox.

Set it up

  1. 1

    Create a pingutil API key in your dashboard and store it as PINGUTIL_KEY on the platform that will receive the webhook.

  2. 2

    Deploy the Cloudflare Worker below and set EASYFORM_WEBHOOK_SECRET to the signing secret for your webhook integration (check the integration settings in the EasyForm dashboard for where it is shown).

  3. 3

    In the EasyForm dashboard, add a webhook integration to the form's access key with your Worker URL. EasyForm rejects URLs on private or loopback addresses and does not follow redirects, so use the final public URL.

  4. 4

    Submit the form once and open Logs on the integration to confirm the delivery returned 200.

  5. 5

    For newsletter forms, you can skip the code: connect the Mailazy integration in EasyForm and a pingutil key on Mailazy's Integrations page instead.

Cloudflare Worker receiving the EasyForm webhook
interface Env {
  PINGUTIL_KEY: string;
  EASYFORM_WEBHOOK_SECRET: string;
  CRM_WEBHOOK_URL: string;
}

async function hmacHex(secret: string, data: string) {
  const key = await crypto.subtle.importKey('raw', new TextEncoder().encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
  const sig = await crypto.subtle.sign('HMAC', key, new TextEncoder().encode(data));
  return [...new Uint8Array(sig)].map((b) => b.toString(16).padStart(2, '0')).join('');
}

// The payload carries your form fields; find the first email-looking value
function findEmail(v: unknown): string | null {
  if (typeof v === 'string') return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v.trim()) ? v.trim() : null;
  if (v && typeof v === 'object') for (const x of Object.values(v)) { const e = findEmail(x); if (e) return e; }
  return null;
}

async function pingutil(env: Env, path: string, body: object, ms: number) {
  try {
    const res = await fetch('https://pingutil.com' + path, {
      method: 'POST',
      headers: { authorization: 'Bearer ' + env.PINGUTIL_KEY, 'content-type': 'application/json' },
      body: JSON.stringify(body),
      signal: AbortSignal.timeout(ms),
    });
    return res.ok ? await res.json<any>() : null; // fail open on 429 / 5xx
  } catch {
    return null;
  }
}

async function screen(env: Env, payload: unknown) {
  const email = findEmail(payload);
  if (!email) return;

  const fast = await pingutil(env, '/v1/lookup', { input: email, skip_enrichment: true }, 3000);
  if (fast?.verdict?.is_spam) return console.log('easyform spam', fast.verdict.reason);

  const v = await pingutil(env, '/v1/verify', { email }, 25000);
  if (v?.status === 'invalid' && !v.did_you_mean) return console.log('easyform invalid', v.reason);

  await fetch(env.CRM_WEBHOOK_URL, {
    method: 'POST',
    headers: { 'content-type': 'application/json' },
    body: JSON.stringify({
      submission: payload,
      email,
      email_status: v?.status ?? 'unchecked',
      did_you_mean: v?.did_you_mean ?? null,
      category: fast?.category ?? null,
    }),
  });
}

export default {
  async fetch(req: Request, env: Env, ctx: ExecutionContext) {
    if (req.method !== 'POST') return new Response('method not allowed', { status: 405 });
    const raw = await req.text();

    // X-EasyForm-Signature: t=<unix>,v1=<hex>, HMAC-SHA256 of the timestamp and body
    const header = req.headers.get('X-EasyForm-Signature') ?? '';
    const parts = Object.fromEntries(header.split(',').map((p) => p.split('=') as [string, string]));
    const expected = await hmacHex(env.EASYFORM_WEBHOOK_SECRET, parts.t + '.' + raw);
    const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
    if (expected !== parts.v1 || !fresh) return new Response('bad signature', { status: 401 });

    ctx.waitUntil(screen(env, JSON.parse(raw)));
    return new Response('ok');
  },
};

What to do with each result

pingutil resultAction in EasyForm
verdict.is_spam: true (disposable or randomized address)Drop the submission from lead routing; it stays in the EasyForm dashboard if you need it.
status: 'invalid' with did_you_meanForward with the suggested address so whoever replies uses the corrected one.
status: 'invalid' without did_you_meanSkip the CRM; nobody can reply to that address.
status: 'risky' or 'unknown'Forward with the status visible. Catch-all company domains return risky, never valid.
category: 'company'Route to sales instead of the shared inbox.

Limits to plan for

  • EasyForm webhooks are fire-and-forget after the submission is accepted, so the visitor never sees a verification result. EasyForm retries once on transient errors and its circuit breaker pauses the integration after 10 consecutive failures, so answer 200 fast and verify in the background.
  • EasyForm documents the signature header and that it is an HMAC-SHA256 of the timestamp and body (Stripe-style), but not the exact signed string or the payload field names. The snippet assumes timestamp, a period, then the raw body, and searches the payload for the email; confirm both against a real delivery in Logs.
  • Each submission costs one lookup and one verification. The Free plan allows 300 verifications a day (3,000 a month) and 2,000 lookups a day; Enterprise has custom limits.

EasyForm documentation

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

Common questions

Can pingutil block the EasyForm submission itself?
Not through the webhook, which runs after EasyForm accepts the post. If you submit with EasyForm's JSON API from your own server route, you can call pingutil first and only forward addresses that pass. Your pingutil key must stay on the server, never in the browser.
Do I need the webhook if I already sync newsletter signups to Mailazy?
No. Mailazy verifies contacts itself once you connect a pingutil key on its Integrations page. The webhook is for contact forms and leads that go somewhere other than Mailazy.

Stop bad addresses in EasyForm 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 EasyForm setup will receive.