Hi Armin,

many thanks for your code. I implemented it in our app and it works like a 
charm. 
But we do an upgrade of 4D the same time. And now, believe it or not, it works 
with the IMAP_Download command from the Internet Commands plugin too.

But that is not all of the story. There wasn't a 4D bug in the old version 
regarding mail download. Instead we detecting a serious bug in our code while 
implementing the workaround.
Look at this pseudo code:

For ($msgIndex;1;$msgCount)
  $error:=IMAP_Download
  If ($error=0)  
      IMAP_Delete // that's the culprit!
  end if
End For

This code works only in the case if there is a lonely mail in the mailbox. If 
there are several mails errors are arising beginning with the second mail .... 
no further comments.
So it's better to delete the mails after downloading all of it! Something like 
that:

For ($msgIndex;1;$msgCount)
  $error:=IMAP_Download
End For
If ($error=0)  
  IMAP_Delete 
End if

Regards
Lutz

> try this workaround. I thought this was a problem with v12 only, but it
> should work with newer versions too
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to