Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internet Protocols Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWSmtpAgent

Module:  Internet Protocols Module   Package:  SMTP


RWSmtpAgentRWAgent

Local Index

Members

Header File

#include <rw/smtp/RWSmtpAgent.h>

Description

RWSmtpAgent sends data to a server via the SMTP protocol. It includes more of the details of the SMTP protocol than the RWSmtpClient class, but has less flexibility.

RWSmtpAgent performs actions in a transaction-based model rather than the connection-based model of the RWSmtpClient. Its methods interact with an SMTP server by connecting, performing the requested action, and disconnecting. Multiple transactions may be performed before the agent object is destroyed. The destructor cleans up resources.

RWSmtpAgent objects are lightweight. They are implemented using the interface-implementation idiom. The RWSmtpAgent is a handle to an implementation that performs the protocol interaction.

Example

Public Enum

enum headerMode { DEFAULT_HEADERS, NO_HEADERS };

Public Constructors

RWSmtpAgent();
RWSmtpAgent(const RWSockAddrBase& address, 
const RWCString& localHost);

Public Member Functions

RWTIOUResult<bool>
dataClose();
unsigned long
getTimeout(void) const;
RWTIOUResult<RWSocketPortal>
send(const RWCString& from, const RWCString& to,
     headerMode h=RWSmtpAgent::DEFAULT_HEADERS); 
void
setTimeout(unsigned long timeout);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.