Re: data_message_init and reading data from files
Matt Ronge <mronge-ePFkAnfr6dRWk0Htik3J/[email protected]> Wed, 27 Dec 2006 15:25:48 -0600
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <[email protected]> |
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? -- 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