Jump to content

Suspend page coming?


DeathStar

Recommended Posts

Hi there everyone.

I have a massmailing script and need advice:

1) The script is sending very slow

2) I have +-1000 users

3) Will my host kick my ass for sending so many mails?

 

Need advice please!

here is the script:

f($_POST['mes']) 
{ 
$ax=mysql_query("SELECT * FROM users",$c); 
while($r=mysql_fetch_array($ax)) 
{ 

$to = $r['email'];
$subj = "News from Sitre";
$mess = $_POST['mes'];   
$headers = "From: [email protected] \r\n";
$headers.= "Content-Type: text/html; charset=ISO-8859-1 ";
$headers .= "MIME-Version: 1.0 "; 
mail($to,$subj,$mess,$headers); 
echo "<h2><b>Sent to {$r['username']}</b></h2>";
} 
print "Newsletter sent to ".mysql_num_rows($ax)." Users"; 
} 
else 
{ 
print "Send Newsletter to everyone!!.<br /> 
<form action='nletter.php' method='post'> 
<textarea cols=30 rows=15 name='mes'> 
</textarea> 
<input type='submit' value='Send!'></form>"; 
} 

Link to comment
https://forums.phpfreaks.com/topic/45641-suspend-page-coming/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.