Here you go - upload this script and your file (referenced in this script as testfile.txt) to your ListMail folder and browse to the script to run it in test mode.
<?php/* import followups from file format (subj/seq/delay/cron/message):followup1# 1# 0# #Hi !fname,Here's my first message to you as a test.Hope you like it.Thanks,-Brett#followup2# 2# 3# #Hi !fname,Did you like my first followup - here's my second.Thanks,-Brett# */// config$filename='./testfile.txt';if(!$live) $testmode=true; // set to false to run it live all the time!// begin scriptif($testmode) echo "TEST MODE - Nothing written to database! Browse to ?live=1 or enable in script<hr>"; else echo "LIVE MODE - Writing to database<hr>";include('./config.php');include('./admin.php');// create and name new followup set$cmd = "insert into $fstable values('','Imported Set ".date("Y-m-d H:i:s T")."');";echo "CMD=$cmd<br>";if(!$testmode){ mysql_query($cmd) or die(mysql_error()); $sid = mysql_insert_id();} else $sid = '99';$file='';$fp = fopen($filename,'r') or die('could not open file '.$filename);while(!feof($fp)){ $file .= fgets($fp,1024);}$data = explode('#',$file);echo "element count = ".count($data)."<br>";// pop off remainders, so elements are divisible by 5$remainder = count($data)%5;if($remainder>0){ for($i=0;$i<$remainder;$i++) array_pop($data); echo "element count2 = ".count($data)."<br>";}echo "message count = ".(count($data)/5)."<hr>";for($i=1;$i<=count($data)/5;$i++){ $j=$i*5-5; $subj = trim($data[$j]); $seq = trim($data[$j+1]); if(!is_numeric($seq)) $seq='1'; $del = trim($data[$j+2]); if(!is_numeric($del)) $del='0'; $cron = trim($data[$j+3]); $msg = trim($data[$j+4]); echo "subj=$subj seq=$seq del=$del cron=$cron msg=".nl2br($msg)."<hr>"; // insert message $cmd = "insert into $ftable values('','0','0','".addslashes($subj)."','".addslashes($msg)."','','','$seq','$del','$cron','$sid');"; echo "^CMD=$cmd<hr>"; if(!$testmode) mysql_query($cmd) or die(mysql_error());}?>
Regards