The dataClose() method in both the RWSmtpClient and RWSmtpAgent classes needs to be called at the end of each data (mail) transfer session. This is because the dataClose() method inserts the end-of-mail indicator—a period contained on a line by itself—before the data channel is closed.
Because a mail message can have a period alone on a line, the SMTP protocol requires that any line with a leading period be sent with two leading periods. You can use the Internet Basics global function rwAddPeriods() to add the necessary periods.
#include "rw/internet/util.h" RWCString msg = getRealMessage(); msg = rwAddPeriods(msg); // now transfer msg using SMTP |
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.