Skip to main content

Posts

Showing posts from September, 2017

Send Mail Using PhpMailer

Hello,     Right not it is common for sending mail for every site for subscription, registration etc. Here I have explain you how to send mail using Phpmailer. It is very easy you nee to only two file 1 ) class.smtp.php 2) class.phpmailer.php From the below given link you can download above two files Download phpmailer library After downloading this two files make one new file "phpmailer.php" and put below code. Using only two files your work done. Here i write one function for sending mail using it you can send mail. <?php function sendEmailAddress($to, $subject, $message) { require_once("class.phpmailer.php"); $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'tls'; $mail->Host = "SMTP HOST NAME"; $mail->Port = 587; // o