• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to export member emails seperated by a comma?

TNCclubman

Well-known member
#1
I want to generate a .txt file with all the users emails (between certain dates) and each one seperated by a comma. I currently do it in vB and import it into my phplist software for newsletters.

In xF, it generates a list, but its

email username
email username

etc.

Any idea how to get it to output in a different way? Even set the seperation syntax to other things besides a comma.

Thanks!
 

Brogan

XenForo moderator
Staff member
#2
There isn't a way to do it from the ACP but you can manipulate the list in Excel easily enough to split the data into 2 coloumns, add a comma and then produce a list.

The other option would be to grab the email addresses directly from the database.
 

Mike

XenForo developer
Staff member
#3
It's tab separated, because it can be easily brought into Excel, or taken directly to something like MailChimp (they support tab delimited files directly).
 

TNCclubman

Well-known member
#5
There isn't a way to do it from the ACP but you can manipulate the list in Excel easily enough to split the data into 2 coloumns, add a comma and then produce a list.

The other option would be to grab the email addresses directly from the database.
Im not too comfortable with excel to be able to do that.
 

TNCclubman

Well-known member
#7
I know phplist is the most popular mailing list software, has anyone had success exporting the emails from xF and into phplist?

What settings do you enter on the phplist side? How do you disregard the usernames from the emails?
 

TNCclubman

Well-known member
#8
I'm happy to do it for you if you provide the file and the exact format you want.
Thanks for the offer Brogan, but it wont be a one time thing. I have to do it every few weeks to keep my mailing list up to date as the phplist and xenforo arent synched together live.
 

Brogan

XenForo moderator
Staff member
#9
No worries.
It would even be possible to build a template in Excel so all you would have to do is paste in the output from the ACP.
 

snoopy5

Well-known member
#10
No worries.
It would even be possible to build a template in Excel so all you would have to do is paste in the output from the ACP.
I would be interested in this. Has someone achieved to make this excel template for a regular and easy export/import from XF into phpList?
 

Jake Bunce

XenForo moderator
Staff member
#12
You can export a list using phpmyadmin. Run this query using phpmyadmin:

Code:
SELECT username, email
FROM xf_user;
If you want to save the results then click Export at the bottom of the page in phpmyadmin after you run the query. It will give you lots of format options.
 

snoopy5

Well-known member
#13
You can export a list using phpmyadmin. Run this query using phpmyadmin:

Code:
SELECT username, email
FROM xf_user;
If you want to save the results then click Export at the bottom of the page in phpmyadmin after you run the query. It will give you lots of format options.

Thanks.

How do I have to enhance this code, if I want to export only email addresses of valid users (verified email addresses) and users who are not banned?