View Full Version : Generating a mailing list
CLKeenan
01-04-2006, 09:29 PM
How do I generate a mailing list with username and email? I would like to select all users that meet a certain criteria (from the userfield table) and then create a csv file with their username;emailaddress.
Is this possible within the admincp? If not, how would I go about doing it?
Thanks,
-Chris
vbulletin 3.5.2
nexialys
01-04-2006, 10:13 PM
>> Admincp >> Users >> Send Email to Users >> that's it!
and btw, this is not a hack, when you need help with the current vBulletin, go to http://vbulletin.com/forum/ for support!
CLKeenan
01-05-2006, 01:12 AM
No, thats *not* what I want. I want a CSV file with a username and a email address. I am not trying to immediately send an email to these people. I am trying to import the list into another newlsetter program.
Thanks,
-Chris
joelabq
01-05-2006, 02:46 AM
I attached a file of a quick little script to do this for you..
Put emaillist.php in your forum's home directory.
Add a template to the style you use on your forum called "email_listbit" and add the following to that new email_listbit template:
$email_list[username],$email_list[email]<br>
This will output a list of ALL your users, one user per line, username then email address delimited by a comma.
This is just a quick script I wrote for you nothing fancy, only works for someone whose in the administrator group (group id 6).
Hope this helps.
Joel
CLKeenan
01-05-2006, 03:04 AM
Joel, thanks for taking the time to do that for me. However, I really need it to be able to select a certain criteria in the userfield table. I'm trying create multiple (4) mailing lists based on this data.
Is there any way you could modify the script to do that?
If it helps, the field in the table userfield that criteria im using is field10 and the data in field10 that I'm looking for is 'US History' (without the 's)
Thanks again,
-Chris
joelabq
01-05-2006, 04:20 AM
You said there was 4 different criteria to query for, you only gave me one. What are the other 3?
It's a quick edit, just let me know.
CLKeenan
01-05-2006, 04:23 AM
US History
US Government and Politics
Psychology
European History
Economics
so make that 5 actually, sorry
-Chris
joelabq
01-05-2006, 05:18 AM
Ok here's a modified version. I didn't need your criteria, as I was thinking for whatever strange reason...
It'll have a form, in fact, you'll need to add another template: email_list with the following in it:
<form action="emaillist.php" method="post">
Field Number: <input type="text" name="fieldnum" value="10"><br />
What to search for: <input type="text" name="input" value=""><br />
<input type="submit">
</form>
$email_bits
The email_listbit stays the same
Replace emaillist.php that I attached, overwrite the old one.
Type in the field number (default is 10 for you) and then type in the search field the string you want to look for.
It will be case senstive in the search string.
Joel
CLKeenan
01-05-2006, 05:26 AM
I hate to sound like an idiot, but how do I access the script? I tried to open the url but all i got was a blank page. Should i be trying to open it another way? I am logged in as the admin user.
Thanks again for doing this, you dont know how much I appreciate it!
-Chris
joelabq
01-05-2006, 05:28 AM
Did you add the two templates (email_list and email_listbit) to your template style?
To access it www.yoursite.com/forum/emaillist.php should do it.
I may not be able to help you more on this until tomorrow.
Joel
CLKeenan
01-05-2006, 05:30 AM
Yes I did. Would you want to take a quick look at it via my admin panel?
-Chris
joelabq
01-05-2006, 07:27 PM
Updated again
Edit--- updated again
CLKeenan
01-05-2006, 07:38 PM
Works now! Thanks a ton :)
-Chris
Gujulvr
04-26-2006, 05:24 PM
hey i wann do something like this.. i wann just genrate email address and username.. and use it in any mailling list script.. so i could send email from external script.. insted of sendin from vbulliten ?
diretur
09-29-2007, 09:31 AM
I would like to add the "joindate" field and order the list by this, any ideas?
thanks
Dismounted
09-30-2007, 06:58 AM
This thread is over a year old...
diretur
09-30-2007, 07:27 AM
I know, but why open a new one?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.