FudBOX.php is a helper script, originally written by Mike Hillyer, that can be used to pipe an entire mbox with multiple E-mail messages into a forum. The code is released under the GPL v2 or higher license.
The following prerequisites must be met before using this script:
File fudbox.php:
#!/usr/bin/php -q <?php define('MBOX_FILE', '/path/to/somearchive.mbox'); // The MBOX file you wish to load define('SCRIPT_LOCATION', '/path/to/FUDdata/scripts/maillist.php'); define('MBOXPHP_LOCATION', '/usr/local/php/lib/php/Mail/Mbox.php'); // Path to the MBOX PEAR Module define('RULE_NUM', 1); // Rule number assigned in the Mailing List Manager // DO NOT MAKE CHANGES BELOW THIS LINE!!! require_once(MBOXPHP_LOCATION); $mbox = new Mail_Mbox(MBOX_FILE); $mbox->open(); for ($i = 0; $i < $mbox->size(); $i++) { $thisMessage = $mbox->get($i); echo "Loading message $i...\n"; pipe_email($thisMessage, RULE_NUM); // $mbox->remove($i); // DELETE MESSAGE FROM MBOX! } $mbox->close(); exit(); function pipe_email($message, $ruleNum) { if(!$PIPE = popen(SCRIPT_LOCATION . ' ' . $ruleNum, 'w')) { exit('ERROR: Unable to open pipe to '.SCRIPT_LOCATION); } if (!fwrite($PIPE, $message)) { pclose($PIPE); exit('ERROR: Unable to write to pipe.'); } pclose($PIPE); return true; } ?>
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Can't contact the database server: Cannot return last error, no db connection)