Sending mail using phpmailer

by Prakash 2013-01-23 17:11:09

Sending mail using php mailer is detailed
below:

Download phpmailer class and do the
script as follows:


include_once 'class.phpmailer.php';

$subject = "hi";
$msg = "hello";
$mail = new PHPMailer();
$mail->IsMail();
$mail->From = "from@example.com"
$mail->Subject = $subject;
$mail->AddAddress("to@example.com");
$mail->IsHTML(true);
$mail->Body=$msg;

if($mail->Send()){
echo "Sent";
}
else{
echo "Not Sent";
}

Tagged in:

560
like
0
dislike
0
mail
flag

You must LOGIN to add comments