require_once('phpmailer/PHPMailerAutoload.php'); $mail = new PHPMailer(true); $email = 'example@email.com'; if(!$mail->ValidateAddress($email)){ echo "Invalid Email Address: $email"; } else { echo "Valid Email Address: $email"; }In this example, we first require the PHPMailerAutoload.php file to load the PHPMailer library. Then, we create a new PHPMailer object and set the $email variable to the email address that needs to be validated. We then use the ValidateAddress method to check if the email address is valid. If the email address is invalid, we print an error message. If the email address is valid, we print a success message. PHPMailer is the package library used in this example as it is loaded using the PHP require_once function.