How can we stop Spam mail received from inquiry form

How can we stop Spam mail received through website inquiry form

  1. Google Recaptcha V2
  2. Do not type the alphabet in Mobile number filled.
  3. @ mandatory in email id filled
  4. Just put this below line in between form tag anywhere in asp.net code
        @Html.AntiForgeryToken()   (This code use only asp.net code)                                                              This is Server Token Key. (Server Token key basically is the secure key of Server)

     

    5.  PHP Code of Server Token Key is : 

    <?php session_start();
    if (!isset($_SESSION[‘token’])) {
    $token = md5(uniqid(rand(), TRUE));
    $_SESSION[‘token’] = $token;
    $_SESSION[‘token_time’] = time();
    }
    else
    {
    $token = $_SESSION[‘token’];
    }
    echo $token;
    ?>

    6. Server Side Form Validation Use:  Follow this link:                                                                  

https://phpgurukul.com/server-side-form-validation-php/