Hi,
I'm not sure I'm doing something wrong but just in case, let me bounce
that off of the experts.
I'm trying to walk all the parts of a multipart message. One of the part
is a message/rfc822 part which contains a multipart message too.
So the code I have looks a little like this:
BODY *body = null;
ENVELOPE *env = mail_fetchstructure(stream, msgNo, &body);
...
and then loop when the type is a multipart message:
PART * curPart = body->nested.part;
while( curPart ) {
// dig
BODY *curBody = curPart->body;
... then when the type for the curBody is TYPEMESSAGE
if( curBoy->type == TYPEMESSAGE ) {
.. we should be able to get to the enclosed body like so:
MESSAGE *msg = curBody->nested.msg;
BODY *msgBody = msg->body;
... and more stuff to do
}
}
That's a bit stylized but you get the general idea.
So in the handling of the TYPEMESSAGE body (msgBody) when the email
sends an enclosed message which is also a multipart message; instead of
getting msgBody->type == TYPEMULTIPART, I get TYPETEXT; and the various
pointers to nested.part, bodies and what not are all null. The enclosed
mail handled as one plain text element (including email headers).
Is mail_fetchstructure the wrong thing to use?
Is this some driver setting I need to configure to get the 'downlevel'
multipart parsed into the structure?
Is there a way to get the TYPETEXT data re-parsed; kind of getting a
ENVELOPE and BODY (maybe?) from the msgBody.content.text.data?
Thanks,
PatH
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw