I am sending mails to two different persons, two different messages one for user and one for admin.
$message1='hello user'
$message2='hello admin'
$email = '[email protected]'
$adminemail = '[email protected]';
require 'PHPMailerAutoload.php';
$mail = new PHPMailer(true);
$mail->isHTML();
$mail->IsSMTP();
$mail->setFrom('[email protected]', 'admin site');
$mail->AddAddress( $email);
$mail->Subject = $subject;
$mail->Body =$message1;
$mail->Send();
//message for admin
$mail->Body =$message2;
//$adminemail = $generalsettings[0]["admin_email"];
$mail->AddAddress($adminemail);
$mail->Send();
But as a user I am receiving the message twice.. How to send two different messages to two different users.