Solved

email to phpBB forum

Posted on 2004-09-14
8
3,236 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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 125 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

740 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