Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

email to phpBB forum

Posted on 2004-09-14
8
Medium Priority
?
3,250 Views
Last Modified: 2008-03-10
Is there a simple way to take an email archive (mailing list) and import it into a forum created with phpBB. This would have to be sorted by the email subject and have some filtering options available.
Thanks
Peregian
0
Comment
Question by:Peregian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:Celardore
ID: 12053494
What do you mean? Import your mailing list into where?

You can run a MySQL query to import the email addresses into your PHPbb database.
0
 
LVL 10

Expert Comment

by:daleoran
ID: 12053787
Hi Peregian

Check this out

http://www.phpbbhacks.com/download/3016

it will allow you to import your mailing list in the form of a csv

Hope this helps

Michael

0
 
LVL 2

Author Comment

by:Peregian
ID: 12053811
Yes, import a mailing list archive into phpBB bulletin board database.  I just want a simple way to do that. So it would become a searchable archive in a forum. I want it to just group all messages by email subject.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Author Comment

by:Peregian
ID: 12053862
I'd better clarify. I'm not interested in hteir email addresses just the email message content.
0
 
LVL 2

Expert Comment

by:Celardore
ID: 12054631
What format is your original mailing list in?

If it is like this?

user@email.com - Subject1
another@user.com - Hello!

A simple PHP script to insert all the data into the database.

<?php
 $link=mysql_connect('localhost','dbuser','dbpass') or die('could not connect to database');
 $list = file('mailinglist.txt');
 foreach ($list as $line_num => $line)
{
 $data = explode(' - ',$line);
 mysql_query("INSERT INTO emails ('email','subject') VALUES('.$data[0].','.$data[1].'),$link) or die(mysql_error());
}
?>

I can't actually test any php at the moment, but I hope that the above code may guide you.

=)
0
 
LVL 2

Author Comment

by:Peregian
ID: 12060131
The original list could be exported into many formats I suppose but I was thinking csv would be easiest to work with. That script may look simple but I have no idea how to run it. Would I have to upload the list and the script to my hosts webserver and run it from there somehow?
You'll have to excuse my dumbness on this subject :o)
0
 
LVL 2

Accepted Solution

by:
Celardore earned 500 total points
ID: 12063029
To run the script, select everything between and including <?php and ?> then save that in notepad or something similar, as 'emailscript.php'.  You will need to change some things, like the 'dbuser', 'dbpass' and the $file variable.

You can export your original list as CSV, but make sure to change the ' - ' in the explode function to be ','

Change the values in the mysql_query() to represent those of your database table.

Also, if you want to use more information from the email information, you can use $data[2],[3],etc.  Every time the explode function hits your explode character (' - ') it will dump the results into the $data[] array which will increment each time it finds a new ' - '.

So once you've made all the changes to that script, you upload the emailscript.php and the mailinglist.txt to your host, then run the location of the script in your address bar.  It should work automatically, but like I said; I'm afraid I can't test it!

Good luck! =)
0
 
LVL 2

Author Comment

by:Peregian
ID: 12063202
Thanks, I appreciate you taking the time to explain that for me.
Looks pretty easy, so I'll see how we go.
I'll get back to you :)
0

Featured Post

Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question