| From: | Wade Halsey | Date: | Wed, 14 Mar 2001 13:24:58 +0000 |
| Subject: | |||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43976@lists.php.net to get a copy of this message | ||
Hi
im having a slight problem with this mail class, it works fine up until the loop runs more than 13
times, is this a looping problem or a mail problem? Ive attatched the mail class and the code is
below:
include "./include/mime_mail.inc";
$fp=fopen(TestFile.txt, "w");
/*loop certain number of times */
for ($val = 0; $val < $NumCases; ++$val){
if ($val < $NumCases) {
blah blah
fwrite($fp,"$FName$IDNum$Addr1$sep$Addr2$sep$Addr3 etc etc"); /*these are vars written to
the test file*/
}
else
{
/*do nothing*/
}
fclose( $fp );
$filename = TestFile.txt;
$content_type ="text/plain";
$fd = fopen($filename, "r");
$data = fread($fd, filesize($filename));
fclose($fd);
/*create new mail object
$mail = new mime_mail;
$mail->from = "mailto:blah@blah.com;
$mail->to = "$Address";
$mail->subject = "Test";
$mail->body = "Test file sent";
$mail->add_attachment($data, $filename, $content_type);
$mail ->send();
Im really stumped here, any help will be greatly appreciated
Thanks
Wade