Linux Hosting Knowledge Base

Find answers to your questions

How to setup SMTP authenticated mail in PHP using PHP Mailer

For setting up SMTP authenticated mailer in your project you have to download the PHP Mailer package From here

After placing the required files in your project location.

Create a webmail account in your cPanel account

Goto Email Accounts

Then Click on create

After setup your account Save the email id and Password for future use.

Then Go to send_mail.php file in the downloaded folder

$mail->Username = ‘[email protected]‘;
$mail->Password = ‘password‘;
$mail->setFrom(‘[email protected]‘, ‘yourname‘);

Change the above credentials with your created webmail account details

That’s it you are already to send mail using SMTP PHP Mailer