I've completed the script, compatible with v1.85 - here it is for others to reference:
<?php$path_to_listmail = '../';$path_to_files = './';include($path_to_listmail.'config.php');include($path_to_listmail.'admin.php');// set up$filename_start = 'My_Email_';$filename_count = '16';$filename_end = '.txt';$list = '11';$set_seq = '1';$set_delay = '15';// set to true to remove all followups on list before adding new ones// make SURE you have set the $list variable correctly above$delete_all_first = false;if($delete_all_first){ echo "<b>Deleting all existing followups on list $list!</b><br>"; mysql_query("delete from $ftable where list = '$list';") or die(mysql_error());}// scriptecho "Processing files...<br>";for($i=1;$i<=$filename_count;$i++){ $subj_next = ''; $body_next = ''; $body = ''; $fn = $path_to_files.$filename_start.$i.$filename_end; $fp = fopen($fn,'r') or die("could not open file $fn"); echo "Opened file: <b>$fn</b><br>"; $x=0; while(!feof($fp)){ $x++; $line = fgets($fp,2048); if($subj_next){ $subject = str_replace("/r",'',str_replace("/n",'',$line)); $subj_next = ''; } if(strpos(' '.$line,'SUBJECT:')>0) $subj_next = 1; if($body_next){ $body .= $line; } if(strpos(' '.$line,'BODY:')>0) $body_next = 1; } echo "Subject: $subject<br>"; echo "Body: ".nl2br($body)."<br>"; fclose($fp); // insert followup mysql_query("insert into $ftable values('','1','$list','".addslashes($subject)."','".addslashes($body)."','','','$set_seq','$set_delay','');") or die(mysql_error()); echo "<b>Imported followup to list $list!</b><br>"; echo "<hr>";}echo "<b>Messages imported! do not refresh this page unless you want to run the script again!</b><br>";?>
Instructions:
1. Copy and paste the code above into a new file on your local computer, such as "import1.php".
2. Open the file and check that all of the settings at the top of the script are as desired.
3. Upload the file to a SUB-folder of your ListMailPRO directory, such as "/mail/myimport" along with the My_Email_*.txt files, which should be named My_Email_1.txt through My_Email_16.txt (according to the $filename_count variable at the top of the script)
4. Browse to the file!
Notes: If you want to fix typos or change your files, change the following line in the script so that the original followups are removed when you re-run the script:
$delete_all_first = false;
-to-
$delete_all_first = true;
Your files are expected to be in the following format:
SUBJECT:
Your subject line
BODY:
Your message body
Your message body
Your message body
Regards