In this tutorial, we will learn how to send an email from localhost using PHP and Gmail. In the PHP web application, mail() function used to send the mail. we will use PHPmailer to send email from the localhost using PHP, Download Source Code How to send email from localhost using PHP