What is the best way to verify the existence of an email address in PHP without the owner knowing?

Verifying the existence of an email address in PHP without the owner knowing can be achieved by sending a verification email with a unique link and tracking if the link is clicked. This way, the email address is verified without directly informing the owner.

<?php

// Generate a unique verification code
$verification_code = uniqid();

// Send a verification email with a link containing the verification code
$to = "email@example.com";
$subject = "Email Verification";
$message = "Click the following link to verify your email address: http://example.com/verify.php?code=$verification_code";
$headers = "From: sender@example.com";
mail($to, $subject, $message, $headers);

// In verify.php, check if the verification code matches the one sent to the email address
$received_code = $_GET['code'];
if ($received_code == $verification_code) {
    // Email address is verified
    // Perform necessary actions here
} else {
    // Verification failed
}
?>