data_message_init and reading data from files

Matt Ronge <mronge-ePFkAnfr6dRWk0Htik3J/[email protected]> Tue, 26 Dec 2006 23:46:08 -0600
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
Hello all,

For testing purposes I have a directory filled with different e-mail  
messages, and I'm going to be loading a few of the messages, parsing  
them using LibEtPan and using them as test data for unit tests. I'm  
reading data in from a file as a string, and them I'm passing the  
data to the function:

mailmessage * data_message_init(char * data, size_t len) which is in  
the data_message_driver.c file. The data is loaded properly, but many  
of the structures within mailmessage have not been filled, and none  
of the data has been parsed. msg_data->msg_message and a few other  
variables are filled inside mailmessage, but not much else. How can I  
force LibEtPan to parse the data and fill the structures in  
mailmessage? I poked around a bit in the code, but I didn't come up  
with anything nice. Any thoughts?

Is there a better way to load an individual message from a file?

TIA,
--
Matt Ronge

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV