Problems with mail()

From: Date: Sat, 19 Feb 2000 02:44:26 +0000
Subject: Problems with mail()
Groups: php.version4 
Request: Send a blank email to php-version4+get-10481@lists.php.net to get a copy of this message
I am having a problem. I am trying to assemble a rather large message (~5megs, at the most) to test some mailservers, etc. It appears as though mail() will only let one send ~ 500k per message. I tried asking around, and I haven't found out why this happens. Here is my source code, in case you care: ---- CUT HERE ---- <HTML> <HEAD> </HEAD> <BODY> <?php if ($num > 0) { if (($mass * $num) > 5000000) { echo "Number * Mass must be < 5,000,000<br>\n"; } else{ echo "<hr>\n"; srand((double)microtime()*$mass); $junk = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLNMOPQRSTUVWXYZ0123456789!@#$%^&*(){}[];':\"\\|=+-_.,><~` "; $junk_size=strlen($junk); srand((double)microtime()*1000000); for ($i = 1; $i <= 76; $i ++) { $r = rand(1,$junk_size); $char = substr($junk, ($r - 1), 1); $line = $line.$char; } $line = $line."\r\n"; echo "Line is \"".htmlspecialchars($line)."\"<br>\n"; flush(); $i = strlen($line); $body = $line; while ($i <= $mass) { $body = $body.$body; $i *= 2; } echo "Message assembled (".$i." actual size)<br>"; for ($i = 1; $i <= $num; $i ++) { mail($to, $subject.$i, $body, "From: ".$from."\r\nX-mailer: MassMailerNG\r\n"); echo "Message $i sent to $to from $from<br>\n"; usleep($delay); flush(); } echo "<hr>\n"; } } if (!isset($num)) { $num = 10; } if (!isset($delay)) { $delay = 0; } if (!isset($mass)) { $mass = 1000; } echo "<form action=mailer.phtml method=post>\n"; echo "Number: <input type=\"text\" name=\"num\" value=\"$num\"><br>\n"; echo "To: <input type=\"text\" name=\"to\" value=\"$to\"><br>\n"; echo "From: <input type=\"text\" name=\"from\" value=\"$from\"><br>\n"; echo "Subject: <input type=\"text\" name=\"subject\" value=\"$subject\"><br>\n"; echo "Delay (in microseconds): <input type=\"text\" name=\"delay\" value=\"$delay\"><br>\n"; echo "Mass (in characters) of the body (will be random text): <input type=\"text\" name=\"mass\" value=\"$mass\"><br>\n"; echo "<input type=\"submit\" value=\"Spam the bastage\">"; echo "</form>\n"; ?> </BODY> </HTML> ---- CUT HERE ---- Thanks in advance! -- Brian Nelson Network Minion mailto:brian@pocketscience.com PocketScience, Inc. * Speak softly and carry a cellular phone.

« previous php.version4 (#10481) next »