Take a look on the Forgerock use case for Email verification.
Use Case:
When user performs self-registration, the registration system should perform a check on their registered email address, to make sure it is live and valid before provisioning to other target systems. This will be done by sending out a verification link to the user, which contains a unique verification code that the user enters to confirm their email address is live. Once confirmed, user is classified as verified, and can be provisioned to appropriate systems.
https://wikis.forgerock.org/confluence/display/openidm/Custom+Endpoint+Email+Verification+Example