Follow

Customize contact verification page for gTLDs

Openprovider allows to customize the e-mails that we send whenever we start contact verification. One of the customizable elements is the confirmation page. By setting up your own confirmation page, you can redirect your customers directly from the verification e-mail to your own portal.

Note that customization is not limited to just one template: you can use the multi-language and multi-tag features that Openprovider supports. More information about setting up your customers to use the right template and language can be found elsewhere in our knowledge base.

Configuration

First of all, configure your customer verification branding and include a Confirmation link to your own website. This confirmation link can be anything, as long as you include the two most important variables:

  • %%email%% is the e-mail address to be verified
  • %%authCode%% is a security code to prevent abuse

Two examples of a valid URL would then be:

https://www.example.com/contact-verification/confirm.php?email=%%email%%&authCode=%%authCode%%
https://verify.example.com/%%email%%/%%authCode%%/

 

Handling verification responses

Basically, your script should call the callback script of Openprovider with the right variables: email, authCode and approval. The approval variable should contain yes or no:

https://rcp.openprovider.eu/misc.php/email/emailVerificationCallback/?email=%%email%%&authCode=%%authCode%%&approve=%%approval%%

There are many ways to accomplish this, one of the approaches is written in an example PHP script below. This script displays a very basic form and asks for an approval or reject. Having that answer, it calls the Openprovider server:

<?php

/* requires confirmation URL including
?email=%%email%%&authCode=%%authCode%%
*/

  if (isset($_GET['approval']) && $_GET['email'] && $_GET['authCode']) {
    $url = 'https://rcp.openprovider.eu/misc.php/email/emailVerificationCallback/'
      .'?email='.$_GET['email']
      .'&authCode='.$_GET['authCode']
      .'&approve='.$_GET['approval'];

// This command requires allow_url_fopen to be enabled
    $response = file_get_contents($url);

// Alternatively, use the PHP CURL functions
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close ($ch);

// Output the response to the website visitor, or use this response in your own script for a better answer
    echo $response;
    exit;
  }     
  else if ($_GET['submit']) {
    echo 'Not all fields completed<br />';
  }

?>  
<html>
  <head>
    <title>Verify e-mail address</title>
  </head>
  <body>
    <form method="get">
      Domain: <input type="text" name="email" value="<?php echo $_GET['email']; ?>" /><br />
      Code: <input type="text" name="authCode" value="<?php echo $_GET['authCode']; ?>" /><br />
      <input type="radio" name="approval" value="yes" <?php if ($_GET['approval'] == 'yes') echo ' checked'; ?> /> Approve
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input type="radio" name="approval" value="no" <?php if ($_GET['approval'] == 'no') echo ' checked'; ?> /> Reject<br />    
      <input type="submit" name="submit" value="Send" />
    </form>             
  </body>       
</html>

There are four possible responses:

  • If an approval is successfully processed, the response is:
    status=Ok;
    message= Email address has been verified.
  • If a rejection is successfully processed, the response is:
    status=Rejected;
    message= Email address has not been verified.
  • If the request is invalid (wrong email), the response is:
    status=Error;
    message= There is no such email address in our system.
  • If the request is invalid (wrong authCode), the response is:
    status=Error;
    message= AuthCode is wrong for this operation.
  • If an other error occurred, the response is:
    status=Error;
    message= Bad input data.

SPF Record

For example, your domain is resellerA.com.
Set a TXT (SPF) record for resellerA.com to:
v=spf1 include:mail.registrar.eu ?all

Set the CNAME record for default._domainkey.resellerA.com to:
dkim.registrar.eu

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.