<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BLOCKQUOTE type="cite"></BLOCKQUOTE>Matthieu Villeneuve wrote:<BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">So far I have a POP3 folder, and a kind of "send/receive" command</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">that fetches all messages from that folder, using the MEL:MESSAGES</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">function. I can already see the message headers correctly positioned.</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">Does that look like the right way to start?</SPAN></FONT></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If you want to use POP3, then I would fetch all remote messages using COPY-FOLDER from the POP3</DIV><DIV>folder to a local Maildir-Folder. If you want, you can use MOVE-FOLDER to move instead of copy the</DIV><DIV>messages. You can use MEL:MESSAGES if you want to display what messages are there without</DIV><DIV>actually fetching the messages. The headers will get loaded on demand if you access a header field</DIV><DIV>of a message. If you do access header data in bulk (for example accessing the "From" header-field on all messages)</DIV><DIV>there is the function ENSURE-HEADERS-READ to ensure all headers are available locally before accessing them.</DIV><BLOCKQUOTE type="cite"></BLOCKQUOTE><BR><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 13px/normal Courier; min-height: 16px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">Once this is done, it looks like a message can be either a</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">MEL:RFC2822-BASIC-MESSAGE, or a MEL:MIME-MESSAGE. In both cases, is</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;">there a simple way to get the message body?</SPAN></FONT></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>You can use MEL:PARTS to get a list of the MIME-Parts of the message. The body of a part can get accessed</DIV><DIV>using MEL:PART-BODY-STRING (or MEL:PART-BODY-STREAM if you want a stream). If you just want</DIV><DIV>the body of the message without taking MIME-Parts into account - you can just use MEL:MESSAGE-BODY-STREAM to access the complete body of the message.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>But: If you wanted to know how to fetch the body so that you can copy a remote messages body into a local mail-store: Don't do that - just use COPY-FOLDER and copy the whole message.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>ciao,</DIV><DIV>Jochen</DIV></BODY></HTML>