Hey guys! I just installed phplist, does anyone know how to import all members emails from smf to phplist? I am having trouble figuring this one out and have done a searchy and couldn't find anything ???
There is no mechanism in SMF to dump the members list into a CSV. Anyone want to write a utility to do this?
As for a quick and dirty solution, go into phpMyAdmin and dump (export) just the smf_members table. Consulting the table definition (e.g., install_1-1.sql), use a text editor to remove the fields you don't want (of course, leave the emailAddress and probably the realName fields). Wrap the fields in " and separate by commas. I think PHPlist wants a first row added which as the field names. Get rid of the INSERT INTO line and any other such overhead, leaving you with just
"realName","emailAddress"
"John Smith","[email protected]"
"Jane Doe","[email protected]"
etc. PHPlist should be able to use that kind of file.
If you're going to do this often, it would be worth writing a Q&D PHP script to pull out the desired data and create the CSV file all in one shot.
Thank you for your reply, would I have to do this everytime a member joined though?
Unfortunately, yes. Once you have the initial list (CSV file), it might be easier to manually update it every time a member joins or quits (provided you get notification). Or, bite the bullet and cobble up a PHP script to open your database, select the fields, and write out a file that you can directly use with PHPlist.