Re: [PHP] weird mail function problem

2005-02-21 Thread Randy Johnson
You should have this at the top of your for loop $body=; Ahmed Abdel-Aliem wrote: hi i use this code to send email from mysite but when it sends to some accounts it repeats the body part twice in the same email while to other accounts it sends the body one time only can anyone help in that plz ?

RE: [PHP] weird mail function problem

2005-02-21 Thread Brett Patterson
First off, this is not the most efficient way to send mail as it closes reopens connections to the server for each mail. Look into using PEAR. Secondly, I would not loop through everything for each email address. One way to do it would be to say: If($email_to != ){ $to = explode(,,

Re: [PHP] weird mail function problem

2005-02-21 Thread Richard Lynch
Ahmed Abdel-Aliem wrote: hi i use this code to send email from mysite but when it sends to some accounts it repeats the body part twice in the same email while to other accounts it sends the body one time only can anyone help in that plz ? if ($email_to != ) { $to =