最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - How to use third-party SendGrid Email Validation API in Gravity Forms?

programmeradmin0浏览0评论

Please let me know how to use SendGrid Email Validation API in Gravity Forms, using gform_field_validation filter?

Gravity Forms filter example:

add_filter( 'gform_field_validation', function ( $result, $value, $form, $field ) {

  if ( $field->get_input_type() === 'email' && $result['is_valid'] ) {

    // put your code here

  }

  return $result;

}, 10, 4 );

SendGrid Email Validation API:
/

Gravity Forms gform_field_validation Filter:

I want this type of result:

{
  "result": {
    "email": "[email protected]",
    "verdict": "Invalid",
    "score": 0.00089,
    "local": "john.doe",
    "host": "gmial",
    "suggestion": "gmail",
    "checks": {
      "domain": {
        "has_valid_address_syntax": true,
        "has_mx_or_a_record": true,
        "is_suspected_disposable_address": false
      },
      "local_part": {
        "is_suspected_role_address": false
      },
      "additional": {
        "has_known_bounces": false,
        "has_suspected_bounces": true
      } 
    },
    "ip_address": "123.45.67.89"
  }
}

Thanks in advance :)

发布评论

评论列表(0)

  1. 暂无评论