[SOLVED]
My hosting company runs MM.2. I host a website for a local org and we send out a monthly newsletter via email. I use Mariadb/Mysql to keep track of members, dues paid, etc. But because MM.2 doesn't be sql... - workaround(s)
A) Mariadb DB and a webpage that looks like a spreadsheet. Click on member ID and up pops a edit window: fname, lname, address, dues(paid thru)... - add new member etc.
B) MM list.
a. lets.sync.php that: exec ("curl -s 'http://lists.ourorg.org/roster.cgi/newsletter-ourorg.org?roster-pw=12345678&roster-email=me@ourorg.org' | sort", $data);
foreach ($data as $d) extract all the emails - hint: look for "options.cgi" and add to array mm
b. select email from memberlist where dues >= 2021 to array db
Then I have to go both ways: foreach ($db as $mem) { if ( ! in_array ( $item, $mm) curl_it ("add", "$mem") }
and foreach ( $mm ... curl_it "del", "$mem"
C) function curl_it ($ad, $mem) { $H="http://lists.ourorg.org/admin.cgi/newsletter-ourorg.org/members"
switch ($ad) case add: $URL = "$H/add?subscribees=$em&adminpw=12345678"; break; case del: $URL = "$H/remove?unsubscribees=$em&adminpw=12345678"; break;
$ch = curl_init("$URL");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Shhhh!
$output = curl_exec($ch);
curl_close($ch);
}
Hope this helps someone else.