hey.
I have a mail problem. with the following code, i want to send mail to a mailing list. the emails to send the message to are in a file, each address seperated by a %. when the list is small, no problem. problem is the actual list is massive. is there a limit to the mailheader part? any way around the limit?
thanks and here's the code
-paulo
$recipient = $youremail;
$mailheaders = "From: $recipient \n";
$mailheaders .= "Reply-To: $recipient\n";
$lines = explode("%",$content);
while(list($key)= each ($lines)){
$mailheaders.= "Bcc: ".$lines[$key]."\n";
}
Data was entered, display email for inspection...
if ($send=="test"){
print "This is what your email looks like:<br><br>";
print "<pre>$mailheaders\n<b>Subject</b> : $subject\n<table><tr><td width=450><b>Message</b> : $message</td></tr></table></pre>";
print "<form><input type=hidden name=mailheaders value=\"".$mailheaders."\"><input type=hidden name=subject value=\"".$subject."\"><input type=hidden name=message value=\"".$message."\"><div align=\"center\"></div><input type=submit value=send><input type=hidden name=pw value=".$pass."><input type=hidden name=send value=yes></div></form>";
}
Data was ok, send button is pressed
if ($send == "yes"){
print "<b>The following email has been sent!</b>";
print "<pre>$mailheaders\n<b>Subject</b> : $subject\n<table><tr><td width=450><b>Message</b> : $message</td></tr></table></pre>";
mail ($recipient,$subject,$message,$mailheaders);