SMTPDebug = 2;                                 
    $mail->isSMTP();                                      
    $mail->Host = $hostname;  
    $mail->SMTPAuth = true;                              
    $mail->Username = $username;                
    $mail->Password = $password;


	$mail->SMTPSecure = $auth;                           
	
    $mail->Port = $port;                                  

    //Recipients
    $mail->setFrom($from);
    $mail->addAddress($to);     // Add a recipient

    //Content
    $mail->isHTML(true);                                  // Set email format to HTML
    $mail->Subject = $subject;
    $mail->Body    = $body;
    $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

    $mail->send();
    echo 'Message has been sent';
} catch (Exception $e) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
}
?>		

	
	Now You Can Test Mail