On Wed,  4 Apr 2001 16:58, Dhaval Desai wrote:
> Hi!
>
>
> This is my code for sending email to all the emails in
> my database:
>
> $connect = mysql_connecT();
> $query = "select email from table";
> $execute = mysql_db_query("database", $query);
>
> while($r=mysql_fetch_array($execute))
> {
> $email .= $r('email')
>
> mail("$email", "My Subject", "Line 1\nLine 2\nLine
> 3");
> }
>
>
>
> Will this send email to all the emails in the
> database?
> Is there any otehr wya of doing it?
>
>
> Thank You
>
> Dhaval Desai

If you fix your syntax in the line starting $email, and if you comma 
separate the list of email addresses, and put the mail function outside 
the loop, and there aren't too many mails for your MTA, you might have 
some success.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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