Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
while loop and mail function
Old 04-28-2005, 10:18 AM while loop and mail function
Experienced Talker

Posts: 30
Trades: 0
Hi Everyone...

I have a MySQL database set up to store email addresses for subscribers of my site...
I have a form set up to send everyone an email...

the form sends $subject and $body to this script...

PHP Code:
    $query "SELECT email_addresses FROM database";
    
$result mysql_query ($query);
    while (
$row mysql_fetch_array($resultMYSQL_NUM)) {
        
mail ($row[0], $subject$body"From: me@my_web_site.com");
    } 
Here is what happens...
Only the first 4 or 5 subscribers receive the email... Is there some sort of spam protection built in somewhere??? How do I get around this???

Thanks,
Bryan

Last edited by Bryan; 04-28-2005 at 12:09 PM..
Bryan is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-28-2005, 12:11 PM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
the mail function opens up a new connection every single time you call it so there is a good chance that your host has limited the amount of times it can be called per x amount of seconds so as not to bring down the whole server.

What you need to do is open up a constant socket connection to your IMAP server and send all messages through one socket.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to while loop and mail function
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31980 seconds with 12 queries