Thank you for your question. As long as the PHP script that you are using is on the same server, localhost is correct.
$mail->Host = "localhost";
I recommend following our article titled How do I use phpMailer to Send Email through PHP, since it provides a successful example.
If you have any further questions, feel free to post them below.
|Email:||support@WebHostingHub.com||Ticket:||Submit a Support Ticket|
|Chat:||Click To Chat Now|