Sheela,
In your case, the error is happening in one of the 48 iterations (presumably the first one) of the RETR POP MAIL subVI in the For Loop of Get All Messages, and that error is getting passed to subsequent iterations of that subVI. That's why you see an error on both the input and output side when all the iterations are done, even though there isn't any error passed initially from CHK POP MAIL.
Error 56 is a timeout error that is happening either because the TCP Reads aren't happening as fast as expected, or because (in my non-robust implementation) the mail text body is not broken up with any CRFL characters at least every 1,000 bytes, or for various other reasons. Timing and handshaking can be very tricky with TCP communication.
To really resolve the problem here would involve rewriting the "POP Read to DOT-CRLF" subVI in a more robust way that doesn't depend on seeing any CRLFs in the mail body, but only the final PERIOD/CRLF sequence that signals the end of the message.
Otherwise, some quick and dirty suggestions are:
- Try increasing the hardcoded TCP timeout inputs, especially in the POP Read to DOT-CRLF subVI. I actually doubt this alone will work, but...
- Increase the Bytes to Read input in POP Read to DOT-CRLF to some fairly large number. Maybe 250000 or more.
- Modify the code to ignore Error 56
- Modify the code to ignore all errors
Hope that helps,
John