Extracting mail data (for a SQL database)

2008-01-14 12:47:21
I am trying to extract mail data from mailing list files to put into a MySQL database. (I want to be able to query an mbox file by certain fields in the MySQL database.) What I need help with is obtaining the To, Cc, and Received date fields.

So far I tried adding some code in the doit function in to get some data:

foreach $my_index (@my_array) {
        $my_date = (split(/$X/o, $my_index))[0];
        $my_num = $IndexNum{$my_index};
        $my_from = &extract_email_name($From{$my_index});
        $my_from_address = &extract_email_address($From{$my_index});
        $my_msg_id = $Index2MsgId{$my_index};
        $my_in_reply_to = $Refs{$my_index};
        $my_subject = $Subject{$my_index};

*  Is this the appropriate place to do that?
*  How might I get the to, cc, and received dates?

Thank you very much for reading :)

 - Scott

(I am sorry if this got posted twice - I sent the first one before I was subscribed so I'm not sure if it went through.)

<Prev in Thread] Current Thread [Next in Thread>
  • Extracting mail data (for a SQL database), kingsc <=