Php mail() fails for 600 recipients

software development

#1

I’ve read another similar problem (posted from greenmile) but I believe mine is a bit different, because mail() function return success, but no mail is sent.

I have a members database, and the query return about 600 email adresses.
I want to mail same text to every members
I wrote a loop like

for($i=1 to 600) {
if(mail(–>to mister $i)) echo $i
else echo failure
}

I have in return the 600 $i values as a confirmation, so mail() seems to succeed, but no mail received…

I had first tested the script with only 3 recipients and it worked…

What am I doing wrong ? Is there a DH limitation to mail() ? If yes, how can I do ?

Thanks for any help !


#2

I don’t do mass mailing, so I don’t know what limits there are. It seems likely that DreamHost will have some kind of limit, so why not write your code to perform the mail function in chunks. You can use the LIMIT clause in MySQL to pull chunks of email addresses from your database, and then send a chunk out each hour or something.


Simon Jessey
Keystone Websites | si-blog


#3

I read in another post that DH has a limit of 200, but it can be up to 1000 if requested.
Silk


#4

You definatly would be better off if you can do that in multiple batch jobs, too. To ease the load on the mail server and prevent yourself from looking like any kind of spammer.

Just an edicat thing. Be nice to the applications and they’ll be nice to you, too. :stuck_out_tongue: