I was creating this little program to help me out sending emails but there is a issue i can't solve.
The $file variable is a resource returned by fopen(). The first parameter for mail() should be a string containing the email address of the recipient.
I have one other question how do i increase the time limitation of 30 seconds per execution in PHP?
I'm having problems running the whole script under 30 seconds.
You cannot really speed up how fast mail is sent. You probably need to call the script multiple times. Each call would only sends a small number of emails. But then, you will need to keep track of the number of the last email. It would be much easier with a database. Each record could have the email address and whether it had been send. Then just select the next N unsent email each call, and mark them in the database when they are sent.