Current location: Hot Scripts Forums » Programming Languages » PHP » Having a problem with mail()


Having a problem with mail()

Reply
  #1 (permalink)  
Old 07-20-05, 06:09 PM
2jesters 2jesters is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Having a problem with mail()

Hi Gang,

I've written an program to send emails to my subscribers listed in my mySQL database. Everything works fine until about 200 emails have been sent. Then I get this message in a returned emails from the rest of the list - unrouteable mail domain "(domain's name).com", these are like yahoo, msn, etc.

I tried putting a 1 second usleep in between each search of my database, but that didn't help.

Any suggestions?

Thanks
John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-21-05, 04:05 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

$i 1;

$max 99;

//Do sql query
$sql mysql_query("SELECT email_address FROM table");
while(
$r mysql_fetch_array($sql)) {

//Check if max
if ($i == $max) {
//Sleep for 3 seconds
sleep(3);
$i 0;
}

//Send email
mail($email$subject$message$from);

//Increment $i
$i++;


__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-21-05, 11:25 AM
2jesters 2jesters is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks FiRe.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail problem boxkites PHP 2 01-11-06 10:56 PM
problem with mail() nfinity8 PHP 13 05-26-05 01:00 PM
Upload Script Problem!!! seanknighton Perl 0 03-21-04 10:54 PM
send mail problem jilshi JavaScript 0 03-01-04 10:48 PM


All times are GMT -5. The time now is 08:53 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.