Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How to NOT send empty files via email?
August 9, 2012, 3:19 pm
rate this thread
I have a simple php page that grabs a .txt file if it exists and emails it.
I would like to modify it so that if the file is under 60 bytes, dont send it.
Here is what I am doing to send the file:
$messageBody .=file_get_contents("d:\notes\note $filedate.txt");
$messageBody .=file_get_contents("d:\notes\middaynote $filedate.txt");
$headers = "From: email@example.com";
mail("firstname.lastname@example.org","Here are your reports
thanks for any help
- » How to make Apache to allow an executable to leave a file?
- — Previous thread in » PHP Scripting Forum