I wrote a nice little news forum in PHP w/MySQL I also wrote a mass mailer for the forum but I just discovered that PHP has a default time limit of 30 seconds. (Live and learn..)

The structure:
The news forum table entries are copied to a merge queue table. The mass mailer uses fsockopen and fputs to send the email.

Question:
Do I need to write something in Java to take the merge queue and send that or how exactly would I go about this?