Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 05:07 pm EST

Geeklog Forums

Mail to story converter


fg

Anonymous
Hi, I was wondering how could I convert a mail archive of a mailing list to Stories, so that when some user sends an e-mail to the list, it will appear as if it was a Story...No I'm using MHonArc to convert an ezmlm mailing list to html...Any ideas? Thanks in advance.
 Quote

fg

Anonymous
At least it could be nice to insert the maillist.html (mail index) to a static page, but anyway what would really be great is to insert everything as static pages... anyone providing some tips to make those inserts?
 Quote

kotalampi

Anonymous
Here's a quick hack for mail to geeklog gateway: - take mail_to_db.pl that ships with MySQL - import emails to table Mails: CREATE TABLE Mails ( mail_id mediumint(8) unsigned NOT NULL auto_increment, date datetime NOT NULL default '0000-00-00 00:00:00', time_zone varchar(20) default NULL, mail_from varchar(120) NOT NULL default '', reply varchar(120) default NULL, mail_to text, cc text, sbj varchar(200) default NULL, txt mediumtext NOT NULL, file varchar(64) NOT NULL default '', hash int(11) NOT NULL default '0', Category varchar(50) NOT NULL default 'Misc', sid varchar(20) default NULL, submitted int(11) NOT NULL default '0', PRIMARY KEY (mail_from,date,hash), KEY mail_id (mail_id), KEY mail_from (mail_from), KEY date (date), KEY time_zone (time_zone), KEY mail_from_2 (mail_from), KEY reply (reply), KEY sbj (sbj), KEY file (file), KEY hash (hash) ) TYPE=MyISAM; - create random sids for articles which don't yet have it - write couple of lines of SQL which will take stuff 'Mails' table and convert them to gl_storysubmission table. For example: INSERT INTO gl_storysubmission (sid, uid, tid, title, introtext, date, postmode) select sid, '14', 'Unsorted', sbj, txt, date, 'plaintext' from Mails WHERE submitted = 0 ORDER by mail_id DESC; UPDATE Mails SET submitted = 1; 14 is the uid I'm using as a sender of these articles. And I'm importing things to Unsorted category. I have also added --category option to mail_to_db.pl which can set the Category column during the import. Of course, there's much to improve here. I'd be very interested in seeing complete mail list <-> geeklog gateway (both ways). Does anyone have anything available or should I code this myself (anyone else interested in?).
 Quote

All times are EST. The time is now 05:07 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content