Sending mail using phpmailer
by Prakash[ Edit ] 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";
}