BitForms & Reoon Email Verification Plugin Stop Spammer In There Tracks

I’m excited to share that the BitForms plugin, integrated with Reoon email verification, is now fully functional! This tool is designed to drastically reduce spam by validating email addresses in your forms, ensuring only legitimate emails are accepted and keeping your inbox secure. The email verification is handled through Reoon, a trusted provider known for its accuracy and reliability.

To get started, you’ll need to modify the script by adding your Reoon API key and updating the email field label within the form. This ensures the plugin works seamlessly with your setup and maintains effective email verification.

Please note that Reoon’s free account limits you to 20 email verifications daily and 200 verifications per month. If you need more, they currently have an excellent AppSumo deal that you can take advantage of here. Alternatively, you can sign up for a free account on their website using this link: Reoon Email Verifier.

Additionally, you will need to include the BitForms field key for the email address in your form to ensure proper verification. This integration will block fake or disposable email addresses from reaching your inbox, making it easier to manage your email flow and prevent spam.

A huge thank you to BitForm support for proofing the plugin and fixing a few minor issues—A+ guys! With BitForms and Reoon working together, you get an efficient, scalable solution for email verification right within your forms. Stay tuned for more updates and instructions on how to implement this email verification plugin!

Please change these lines in the coding.

  1. line 6 add your API key from Reoon $reoonApiKey = ‘your codes here’; // Your Reoon API key
  2. Line 13 Change the fieldkey of the email field $fieldKey = ‘b1-5’;
  3. Line 3 Don’t forget to set the form ID $targetFormIds = [1]; you can have more than 1 form ID [1,2,3]
  4. This is a custom Script that needs to be placed in the functions.php or a sscript snippet plugin.

This is a script only.

I use fluent snippet plugin for all my functions, js, and CSS:

If you need help installing Fluentsnippet and get it working message me @wpscriptly or FB me in a message.

This works with Free version and Pro version of Bit Forms!

function validate_email_with_reoon($validated, $form_id) {
    // the $validdated contains true/false/wp error

    $targetFormIds = [1];  // Update with your form IDs
    $errorMessage = 'Looks like the email is not correct, or has been reported as Spam.';
    $reoonApiKey = 'YOUR AIP KEY GOES HERE';  // Your Reoon API key

    // Check if the form ID matches
    if (!in_array($form_id, $targetFormIds)) {
        return $validated;
    }

    $fieldKey = 'b1-5';  // Make sure this matches the correct email field key in Bit Form

    // Check if email field is empty
    if (empty($_POST[$fieldKey])) {
        error_log('Email field is empty.');
        return $validated;
    }

    $email = sanitize_email($_POST[$fieldKey]);

    error_log('bitform email='. print_r($_POST, true));

    // Verify the email using Reoon API
    $request = wp_remote_get('https://emailverifier.reoon.com/api/v1/verify?email=' . urlencode($email) . '&key=' . urlencode($reoonApiKey) . '&mode=power');
    // May be you use invalid API
    // $request = wp_remote_get('https://emailverifier.reoon.com/api/verify?email=' . urlencode($email) . '&key=' . urlencode($reoonApiKey) . '&mode=power');
    
    // Check for API request errors
    if (is_wp_error($request)) {
        error_log('Reoon API request failed: ' . $request->get_error_message());
        // if you want restrict form submission after get wp error you can return wp error or false here
        // return new WP_Error('email_invalid', $errorMessage);
        return $validated;
    }

    $response = json_decode(wp_remote_retrieve_body($request), true);

    // Log the API response for debugging
    error_log('Reoon API response: hello' . print_r($response, true));

    // Validate email based on Reoon API response
    if (isset($response['status']) && $response['status'] !== 'valid') {
        error_log('email is invalid');
        return new WP_Error('email_invalid', $errorMessage);  // Return WP_Error to show validation error
    }

    return $validated;
}

add_filter('bitform_filter_form_validation', 'validate_email_with_reoon', 10, 2);

Deep Dive Summary

This text provides instructions for integrating the BitForms plugin with Reoon email verification. The integration aims to reduce spam by validating email addresses in forms, ensuring only legitimate emails are accepted. To implement the integration, users need to add their Reoon API key, update the email field label, and include the BitForms field key for the email address in their form. The text also notes that Reoon offers a free account with limited verifications, but users can upgrade or sign up for a free account on their website. Finally, the text acknowledges BitForm support for their contributions and encourages users to stay tuned for future updates.

Bitforms-Reoon Working Together

Notes:

Wp Scriptly

This basic script, CSS style, and plugin are designed to function optimally assuming minimal interference from your theme or other plugins. If conflicts occur or further customization is needed, additional adjustments may be necessary. Please note that this script, CSS style, or plugin must be used AS IS.

Wp Scriptly

Newsletter signup

WpScriptly

Subscribe to my WpScriptly newsletter for WordPress tips, plugin tutorials, and exclusive updates—delivered straight to your inbox!

Comments: