Re: data_message_init and reading data from files
DINH Viêt Hoà <[email protected]> Thu, 28 Dec 2006 00:00:33 +0100
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <[email protected]> |
On Dec 27, 2006, at 10:25 PM, Matt Ronge wrote: > On Dec 27, 2006, at 5:53 AM, DINH Viêt Hoà wrote: > >> On Dec 27, 2006, at 6:46 AM, Matt Ronge wrote: >> >> You can use : >> >> mailmessage_get_bodystructure(msg, &dummy); >> msg->msg_mime will be filled with the mime structure of the message. >> the headers of the message will be in the main part of the mime >> structure. >> >> (if not, you have mailmessage_fetch_envelope() to get the headers) >> > > Thanks Hoa, > > Here's what I ended up with: > > /* mailmessage_get_bodystructure will fill the mailmessage struct > for us */ > err = mailmessage_get_bodystructure(msg, &dummyMime); > assert(err == 0); > /* mailmessage_fetch_envelope does not fill the struct, so that's > why we don't have a dummy variable */ > err = mailmessage_fetch_envelope(msg, &(msg->msg_fields)); > > Works great, but another question: > Why doesn't mailmessage_fetch_envelope set the msg_fields struct > inside mailmessage like mailmessage_get_bodystructure? some bad historical reason ... I can't break the semantic. I guess obviously that msg_fields was the field in the structure that was mainly missing. I'll try to fix the behavior of data_message_init() to fill msg- >msg_fields. -- DINH Viêt Hoà ------------------------------------------------------------------------- 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