How to use SMTP authentication on PHP mailer?

Phpmailer is a mailing script which is used to send emails via php files. In this article we are going to show you how to authenticate your email in the script. WebSouls Web Hosting provides below artcile which will assist you to enable SMTP authentication on phpmailer.

Step-1:

Let's start by downloading phpmailer from this link.

Php-Mailer

Step-2:

Once you have successfully downloaded your PHPmailer you have to upload it on your hosting account as shown in below image and extract it:

PHP-Mailer

Step-3:

Open file which is located at /PHPMailer-master/examples/smtp.phps and rename it to smtp.php :

PHP-Mailer

Step-4:

Change the parameter from isSMTP(); to ismail(); as shown in below image:

PHP-Mailer

Step-5:

Provide your email credentails as shown in below image:

PHP-Mailer

Step-6:

After successfully providing your email credentials in the file you can send a email text as well by simply typing the message after "$mail->AltBody ="  parameter in the same file. 

Now you can include the file in your custom files and send emails using your authenticated email address.

We hope that the above article was beneficial for you if you liked it please give us a thumbs up.

Technical Support,
WebSouls.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

PHP URL Redirect

header("location:http://www.domainName.com/index.html");exit;?>

Deprecated: Assigning the return value of new by reference is deprecated in PHP5.3

Fix – Deprecated: Assigning the return value of new by reference is deprecated in PHP5.3     I...

What is PHP?

  PHP is  generl-purpose server-side scripting lnguge originlly designed for web development to...

Creating your own php.ini

http://php.net/manual/en/function.error-reporting.php   Creating your own php.ini   In...

PHPMailer Tutorial

PHPMailer tutorial     Introduction    Requirements     About PHPMailer     PHPMailer Features...