Moving message from POP to IMAP

Giganews Newsgroups
Subject: Moving message from POP to IMAP
Posted by:  Valdir (ogecr…
Date: Fri, 17 Apr 2009


I'm trying to move a message from a pop3 account to another server imap4
account using the following code snippet and Indy 10.2.3.
But on the target imap account the messages without attachments appear
with a CRLF . CRLF at the end of the message.
And the messages with attachments appear blank. I am using outlook express
to check the results on the target server.
If I use the same account, on the same server, read from pop and write to
IMAP, I got the same results. And on each try the message appear with more
dots. For example, 3 tries, the end of the message looks like this:




Here is the code snippet.

pop.Retrieve(i, Msg);
if imap.SelectMailBox('INBOX') then
  imap.AppendMsg('INBOX', Msg, Msg.Flags);

Am I missing something?

Thanks in advance for you attention.