Send email from the script is the most used feature for the web application. Basically, mail() function in PHP is used to send email from the PHP script . When you sending email using the PHP mail() function, the mail is sent from your web server. Sometimes it may cause issues on sending an email and fails to deliver mail to the recipient. With SMTP you can overcome this issue, SMTP is the most recommended way to send email from the PHP script. When you send an email via SMTP , email is sent from the mail server rather than the web server. The easiest way to send email in PHP with SMTP is to use PHPMailer library. PHPMailer provides an ability to send email via SMTP server in PHP. Various configuration options of PHPMailer library allow you to send a text email, HTML email, and attachments. In this tutorial, you’ll show how you can send HTML email with SMTP in PHP using PHPMailer. You can use the following example script to send SMTP mail using PHPMailer library. Send HTML Email vi...