melan wrote: >I understand nsImapProtocol.cpp use "SendData(protocolString)" to >request information from server. However, I don't know where to get >the received data like body text in mozilla code. Would anyone help >me? > The following is how I remember it from about a year (or more) ago. It might be wrong, and I'd be happy to hear a core Mozilla developer on it myself.
Mozilla Mailnews uses the means of netwerk to retrieve that data. So, you create a Channel and use a StreamListener to get to the data. (This all happenes asyncronously, which was a big problem for me, and still don't know how to work around that, as the syncronous access ways are not implemented.) This invokes the Mailnews protocols and libmime in the background. You can give libmime several parameters (IIRC via the query syntax of URLs) on how to format the data (raw, HTML, XUL etc.) and which parts (main body, attachments etc.) to retrieve. HTHs until someone else corrects me Out of curiosity: For what do you need that? Ben
