// forms and surveys
Via APIWPForms email verification with pingutil
WPForms saves the entry and sends notifications for any address that passes its format check, so contact and sign-up forms fill up with temp-mail and bot addresses. The wpforms_process action runs after WPForms' own validation and before the entry is saved; adding an error there stops the submission and shows a message on the field. Using pingutil's fast lookup mode keeps the check quick enough for a visitor waiting on the submit button.
Where it connects: wpforms_process PHP action with wpforms()->process->errors
What goes wrong without it
- The WPForms contact form gets daily submissions from addresses like x7kq2m9@ some random domain.
- Our newsletter form adds temp-mail sign-ups straight into the email list.
- We tried a long blocklist in a plugin and it was out of date within a month.
What you can do with WPForms and pingutil
Reject disposable addresses at submit
verdict.is_spam is true for domains on the disposable list (about 9,900 domains, re-synced weekly), so throwaway sign-ups get an error instead of an entry.
Stop bot submissions with random addresses
Randomized local parts set verdict.is_spam even on real-looking domains, which catches bots that rotate through generated addresses.
Require a work email on demo requests
Add a check for category "free" or "isp" on your demo form and ask for a company address there, while leaving the newsletter form open to everyone.
Set it up
- 1
Create a pingutil key and define PINGUTIL_KEY in wp-config.php.
- 2
Add the action below to a site plugin or your child theme's functions.php.
- 3
Optionally limit it to specific form IDs with the in_array check at the top.
- 4
Test with a known disposable domain and with a real address on a staging site first.
<?php
add_action( 'wpforms_process', 'pingutil_wpforms_screen', 10, 3 );
function pingutil_wpforms_screen( $fields, $entry, $form_data ) {
$form_id = absint( $form_data['id'] );
// Limit to specific forms if you like: if ( ! in_array( $form_id, array( 5, 7 ), true ) ) return;
foreach ( $fields as $field_id => $field ) {
if ( $field['type'] !== 'email' || empty( $field['value'] ) ) {
continue;
}
$response = wp_remote_post( 'https://pingutil.com/v1/lookup', array(
'timeout' => 3,
'headers' => array(
'Authorization' => 'Bearer ' . PINGUTIL_KEY,
'Content-Type' => 'application/json',
),
// Fast mode: category + verdict in milliseconds, no company enrichment.
'body' => wp_json_encode( array( 'input' => $field['value'], 'skip_enrichment' => true ) ),
) );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
continue; // fail open
}
$data = json_decode( wp_remote_retrieve_body( $response ), true );
if ( ! empty( $data['verdict']['is_spam'] ) ) {
wpforms()->process->errors[ $form_id ][ $field_id ] = esc_html__( 'Please use a permanent email address.', 'my-site' );
wpforms()->process->errors[ $form_id ]['header'] = esc_html__( 'Please correct the errors below.', 'my-site' );
}
}
}What to do with each result
| pingutil result | Action in WPForms |
|---|---|
| verdict.is_spam: true, reason disposable_domain | Add a field error asking for a permanent address. |
| verdict.is_spam: true, reason randomized_local_part | Add a field error; this is usually a bot. |
| verdict.low_trust: true (role_based, system_generated) | Let it through. Addresses like info@ are real for small businesses. |
| category: "free" or "isp" | On B2B demo forms only, ask for a work email. |
| request failed or timed out | Let the entry through. |
Limits to plan for
- Fast mode does not open an SMTP connection, so it will not catch a mistyped mailbox at a real domain. Run /v1/verify after submit (from a notification webhook or cron) if you need mailbox-level checks.
- Privacy-relay aliases and some real non-English names can score as randomized. If your audience uses Hide My Email, consider flagging randomized_local_part instead of blocking it.
- WPForms does not support custom code, so test on staging. Each check counts toward the 2,000 lookups a day (30,000 a month) per account. Those are Free plan limits; Enterprise has custom limits.
WPForms documentation
WPForms is a trademark of its owner. This integration uses WPForms's documented extension points; it is not an official WPForms app.
Common questions
- Why use /v1/lookup instead of /v1/verify in WPForms?
- The visitor is waiting on the submit button. Lookup in skip_enrichment mode answers in milliseconds and catches disposable and random addresses. A full mailbox check can take seconds, so it fits better after the entry is saved.
- Does an error in wpforms_process stop notifications and integrations?
- Yes. Any error added to wpforms()->process->errors stops the entry from being saved, so no notifications or integrations run for it.
Stop bad addresses in WPForms 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 WPForms setup will receive.