Okay lets see who has there thinking caps on today (cos I really dont)

I have a list of email addresses stored in a text file.

I am able to run the script and get all the mail addresses in the list
mailed but 
thats all in one mail. I want to be able to open the file, chop each line
and send 
individual messages to each address.. okay who is confused as Im not giving
you much 
description here, well okay heres what the script looks like....

#!/usr/bin/php -q


        $sms_list = "test_number";
        $emails = file($sms_list);

        for ($i=0; $i < count($emails); $i++) $emails[$i] =
                $recipient = implode(",", $emails);

print "$recipient";


        $mail_subject="test this";
        mail($recipient, $mail_subject, $mail_body);
        print "mail sent\n";



Im just thinking(trying to at least) I need some sort of foreach statement
like in perl, right? 
so that it would say 

send mail 

anyone that could maybe guide me? 

Thanks in advance


Chris Grigor
Client Services
Call Center: 0860 100 154
Fax: +27 11 340 7345
M-WEB Business Solutions
Making it happen.

Go shopping @ http://shopping.mweb.co.za 
Get your business online @ http://business.mweb.com 

"We all know Linux is great...it does infinite loops in 5 seconds."
- Linus Torvalds

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to