probleme with sending email to group of users

this is my code

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

			{$model2=Null;


				$Person=new Personne;


				$Person=Personne::model()->findByPk($idpersonne);


				if(!empty($Person))


				{


					$model2=new Sendemail;


					$model2->idobjet=$MessageId;


					$model2->idpersonne=$idpersonne;


					$model2->adremail=$Person->email;


					$model2->statut=0;


					$model2->dateenvoi=date('Y-m-d');


					$model2->datereception="";


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


					$model2->sujet=$model->sujet;


					if($model2->save()){


					


				$this->mailsend($model2->adremail,Yii::app()->params['adminEmail'],$model2->sujet,$model2->body,$path);}


				}


				


					


			}

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=Yii::app()->Smtpmail;


	$mail->IsSMTP();


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


    $mail->Subject    = $subject;


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


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


	$mail->Body=$message;


	$mail->IsHTML(true);


	$mail->AddAttachment($attachement);


	$mail->Send();





}

someone has any idea?!

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

do you mean Mailer version????

No.

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

You are using Yii 1.1, right?