PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm trying to write a script that reads emails and acts as a filter for incoming emails.
When i send an email, i have it setup to go to the script with qmail and the script is being called. however, i cant seem to get the email (neither contents nor headers) sent to the script. From what i've seen, its supposed to be sent in php://stdin which is what i'm trying to read from.
filesize() uses the stat() function to retrieve size information. stat() only works on existing files. php://stdin isn't a file, it's a stream, therefore has no size.
You are supposed to loop over the incoming lines until you reach the end of the email.