Extracting mail data (for a SQL database)

View: New views
1 Messages — Rating Filter:   Alert me  

Extracting mail data (for a SQL database)

by kingsc-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
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 mhamain.pl 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.)