Note that the dataClose() method, in both the RWISmtpClient and the RWISmtpAgent classes, needs to be invoked at the end of each data (mail) transfer session. This is because the dataClose() method injects the end-of-mail indicator, which is a period contained on a line by itself, before the data channel gets closed.
Because an email may have a legitimate period alone on a line, the SMTP protocol requires that any line with a leading period be passed with an extra period prefixed. The RWCString utility rwAddPeriods() may be used to add the necessary periods. For example:
#include "rw/toolpro/util.h" RWCString msg = getRealMessage(); msg = rwAddPeriods(msg); // now transfer msg using SMTP
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.