probleme with sending email to group of users

this is my code

foreach($Lid as $idP=>$idpersonne)


				$Person=new Personne;




					$model2=new Sendemail;







					$model2->body='Bonjour '.$Person->nom.''.$Person->prenom.'</br> '.$model->body;









when I send email users get all messages I means thes recieve theirs messages and messaage of others why?! I am sure the problem is with mailsend

and their is the code I am using smtp mailer

public function mailsend($to,$from,$subject,$message,$attachement)




    $mail->SetFrom($from, ' ');

    $mail->Subject    = $subject;

    $mail->AddAddress($to, "");

	$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';






someone has any idea?!

[color="#008000"]/* Moved from "2.0" to "1.1" */[/color]

do you mean Mailer version????


You just posted this topic in a wrong forum, so I moved it to the proper one.

You are using Yii 1.1, right?