HOW TO use gmail to send emails in php using PHPMailer

1 Download PHPMailer from http://phpmailer.sourceforge.net
2 Extract to folder phpmailer
3 Create a file email.php
4 Paste this code and change the values in blue as you need (I modified the sample code given on the PHPMailer homepage)

Code (text):

?>

require("phpmailer/class.phpmailer.php");

IsSMTP(); // send via SMTP

$mail->SMTPAuth = true; // turn on SMTP authentication

$mail->Username = "username@gmail.com"; // SMTP username

$mail->Password = "password"; // SMTP password…

HOW TO use gmail to send emails in php using PHPMailer

See original post by resellwww

Leave a Reply