Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWISmtpAgent


RWISmtpAgentRWIAgent

Module

Networking Tools: Thread-hot Internet Classes (int library)

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Data Types

Member Functions

Synopsis

#include <rw/toolpro/smtpa.h>
RWISmtpAgent agent;
RWISmtpAgent agent("mail.roguewave.com");

Required Libraries

thr, net, int, tls (and possibly std)

Description

RWISmtpAgent is used to send data to a server via the SMTP protocol. It deals with more of the details of the SMTP protocol than the RWISmtpClient class, but provides less flexibility.

RWISmtpAgent performs actions in a transaction-based model rather than the connection-based model of the RWISmtpClient. The 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. Finally, the destructor cleans up resources.

RWISmtpAgent objects are lightweight. They are implemented using the interface-implementation pattern. The RWISmtpAgent itself is really a handle to an implementation that performs the protocol interaction.

Example

Public Enums

enum headerMode { DEFAULT_HEADERS, NO_HEADERS };

Public Constructors

RWISmtpAgent();
RWISmtpAgent(const RWCString& smtpHost, const RWCString& 
             localHost="localhost");

Public Member Functions

RWIOUResult<RWBoolean>
dataClose();
RWIOUResult<RWSocketPortal>
send(const RWCString& from, const RWCString& to,
     headerMode h=RWISmtpAgent::DEFAULT_HEADERS); 


Previous fileTop of DocumentContentsIndexNext file

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