On both questions, you guessed correctly; I was more focused on why the
body was the header+body together. As long as this is the appropriate
behavior from c-client, everything is jolly. I had previously
implemented the obvious hack to just count the header and remove that
prefix from the body. However, I wanted to verify that there wasn't
more of a problem with section numbers, message format, or something
else lurking in the shadows. Thanks!
Charles
Mark Crispin wrote on 12/2/2004 3:55 PM:
On Thu, 2 Dec 2004, Charles Dorner wrote:
When it is recieved, c-client returns the headers in calls to both
mail_fetch_header and mail_fetch_body when given the section number
for the embedded message. Is this supposed to happen or is there a
problem in the message that I need to reformat part of it?
Do they return the same data?
Or does mail_fetch_header() return just the header and
mail_fetch_body() returns the entire message?
Remember that these are not null-terminated strings; they are
size-count strings.
I suspect that the answers to the above questions are "no" and "yes"
respectively. You should check that, just to be sure. If that is the
case, can you then guess how to get the text of the message and the
first body part?
If you're still stumped, let me know and I'll carry you through the
next step.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.