I use the following script to send mail using PHP. Now my requirement is to send a confirmation email with a unique link to click. Which will verify the email id
<?php
$to = "user@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "fromuser@gmail.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
You can do some thing similar to the following:
$message = "Please click on this link to verify your email address given <a target='_blank' href='{your_url}/confirm_email.php?id={user given email which is encrypted}'>{your_url}/confirm_email.php?id={user given email which is encrypted}</a>";
So when the user clicks the link from the mail it would be redirected to your Php page (confirm_email.php) where you can decrypt the id parameter ($_REQUEST['id']) and verify it with the email already provided by the user.