Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to Export Forum Emails

edited September 2009 in Vanilla 2.0 - 2.8
I need to export the email addresses of my forum, so I can contact them all easily. How can I do this?

Comments

  • I would think the easiest way would be to query the database directly and pull the email addresses.

    Are you hosting your own Vanilla forum? What company do you host it with? What version of the forum do you have installed? What do you use to manage the database? PHPMyAdmin?

    I could help write the query for you if I had more details.
  • edited September 2009
    Hi Refringe,

    Thanks for your message.

    You're probably right. I'm hosting my own Vanilla forum with GoDaddy.com's shared hosting plan and I'm using Vanilla 1.1.8 (should I upgrade to 1.1.9?). I think GoDaddy gives me PHPMyAdmin to access the database, but I'm not 100% sure. Helping me by writing a query for the database would be fantastic. Alternatively, could a php code be written to simply display them on a page in the forum directory?

    Thanks,
    Jason
  • Friendly bump. You there refringe or someone who can help?
  • MarkMark Vanilla Staff
    There should be no need to upgrade to 1.1.9 just to get your email addresses. I think your best bet is to contact GoDaddy about PHPMyAdmin. It has a bunch of methods for you to get your email addresses out in a bunch of different formats.
  • Thanks, Mark. I'm happy to go that route. I know where the link to PHPMyAdmin is in my GoDaddy panel. Once I get there, what do I run to get my emails out?
  • It's all pretty straightforward, just go use PHPMyAdmin and into the correct table, and I'm sure you'll figure out yourself (select of the correct column in the user database).

    That's the whole point of having this mysql application instead of using the command line.
  • Why does this have to be so difficult? Why are there no actual instructions anywhere on how to do this? Many other forums make it MUCH easier to do this.
  • LincLinc Admin
    edited October 2009
    "Export mailing list" isn't a base function of Vanilla. You'd need to whip up a simple addon to do this through the forum.

    Actually, I started typing out all the steps to do this in phpMyAdmin and it really sucks if you aren't familiar with it. Also, I'm not going to learn how to make a Vanilla 1 plugin just for this ;)

    So, let's try this instead. Make a new file. Call it 'getmyemails.php'. Open it in a text editor and paste this quick-n-dirty script in it:
    <?php $mysqluser = 'username'; $mysqlpass = 'password'; $mysqlhost = 'localhost'; $db_name = 'vanila'; $connect = mysql_connect($mysqlhost, $mysqluser, $mysqlpass); mysql_select_db($db_name); $r = mysql_query('select Email from LUM_User'); while($a = mysql_fetch_array($r)) { echo $a['Email'].', '; }

    Fill in your MySQL username, password, and database where indicated (the same info you installed Vanilla with). If your database prefix isn't 'LUM_' then change LUM_User to match whatever it is. If you want something other than a comma and space between email addresses, change the comma and space between the single quotes (near the end of the second-to-last line) to a semicolon or whatever it is your email program wants.

    Drop that on your server in whatever folder your Vanilla is installed in, then goto http://yoursite.com/vanilla/getmyemails.php and it'll all spit out in your browser. Select all, copy/paste, and you're done.

    (insert legal disclaimer here about no guarantees, don't blame me, untested, etc etc)

    Delete it immediately after you're done! Anyone could find that page and snag everyone's email. Very very bad.
  • Thanks so much! I have used this coding and configured it for my site/server and it has worked. : )
  • Cool, glad to hear.
Sign In or Register to comment.