Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

23.3 POP3 Specific

Keep in mind that POP3 mail messages are terminated by <period> contained on a line by itself. When you retrieve a mail drop via an RWSocketPortal, which can be obtained through the portal method of an RWIPop3DataReply, don't look for more data if the mail termination indication has been reached.

If you attempt to save a mail message to a file using the RWStreamCoupler mechanism in the int library, make sure you use the pop3StreamFilter global function, whose declaration can be found in the pop3.h header file as the filter of the RWStreamCoupler::operator() method. This filter is used to indicate an end-of-data (mail) condition on a POP3 input stream. The following lines show how to do this:

To handle the possibility that an email message might have a single period on a line, POP3 servers double any period that is the first character in a line. The RWCString utility function rwRemovePeriods() is available to strip any such changed lines. Here is an example:



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.