Download PHP Mailer from Here
<?php
require(“includes/class.phpmailer.php”);
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = “smtp.gmail.com:587”;
$mailer->SMTPAuth = TRUE;
$mailer->Username = “{somename}@gmail.com”; // Change this to your gmail adress
$mailer->Password = “{password}”; // Change this to your gmail password
$mailer->From = “{someid}@gmail.com”; // This HAVE TO be your gmail adress
$mailer->FromName = “Avinash”; // This is the from name in the email, you can put anything you like here
$mailer->Body = “This is the main body”;
$mailer->Subject = “This is mail from Avinash”;
$mailer->AddAddress(“{toaddress email id}”); // This is where you put the email adress of the person you want to mail
if(!$mailer->Send())
{
echo “Message was not sent<br/ >”;
echo “Mailer Error: “ . $mailer->ErrorInfo;
}
else
{
echo “Message has been sent”;
}
?>
It’s amazing designed for me to have a website, which is helpful designed for my know-how.
thanks admin
LikeLike
Thank you so much 🙂
LikeLike