Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Smtp Class Reference

#include <Smtp.h>

Inheritance diagram for Smtp:

AuthSmtp SmtpAfterPop List of all members.

Public Types

enum  Flags { NODATE = 1 }

Public Member Functions

 Smtp (VirtStream &hOut, const std::string &logfilename="") throw (net_error)
 Smtp (VirtStream &hOut, std::ofstream *log=NULL) throw (net_error)
virtual ~Smtp ()
virtual void connect (const Url &to, short int port=25) throw (net_error)
virtual void helo (const std::string &helostr="") throw (smtp_error)
void mailFrom (const std::string &email, const std::string &name="") throw (smtp_error)
void rcptTo (const std::string &email) throw (smtp_error)
void rcptTo (std::istream_iterator< std::string > &begin, std::istream_iterator< std::string > &end) throw (smtp_error)
void bccTo (const std::string &email) throw (smtp_error)
void data (const std::string &data, const std::string &subject) throw (smtp_error)
void addHeaders (const std::string &headers)
void reset () throw (smtp_error)
virtual void quit ()
void setFlags (Flags newFlags)
Flags getFlags () const

Protected Member Functions

std::string getResult () throw (smtp_error)
std::string addRFCHeaders (const std::string &subject)
void buildLogEntry (const std::string &data)
void log (const std::string &msg)

Static Protected Member Functions

static std::string substLfWithCrLf (const std::string &str)

Protected Attributes

bool m_bConnected
Flags flags
std::ofstream * m_log
bool m_bOwnLog
ZeSocket m_sock
std::string from
std::list< std::string > to
std::string additionalHeaders

Member Enumeration Documentation

enum Smtp::Flags


Constructor & Destructor Documentation

Smtp::Smtp VirtStream hOut,
const std::string &  logfilename = ""
throw (net_error)

Smtp::Smtp VirtStream hOut,
std::ofstream *  log = NULL
throw (net_error)

Smtp::~Smtp  )  [virtual]

Member Function Documentation

void Smtp::addHeaders const std::string &  headers  ) 

std::string Smtp::addRFCHeaders const std::string &  subject  )  [protected]

void Smtp::bccTo const std::string &  email  )  throw (smtp_error)

void Smtp::buildLogEntry const std::string &  data  )  [protected]

void Smtp::connect const Url to,
short int  port = 25
throw (net_error) [virtual]

void Smtp::data const std::string &  data,
const std::string &  subject
throw (smtp_error)

Smtp::Flags Smtp::getFlags  )  const

string Smtp::getResult  )  throw (smtp_error) [protected]

void Smtp::helo const std::string &  helostr = ""  )  throw (smtp_error) [virtual]

Reimplemented in AuthSmtp.

void Smtp::log const std::string &  msg  )  [inline, protected]

void Smtp::mailFrom const std::string &  email,
const std::string &  name = ""
throw (smtp_error)

void Smtp::quit  )  [virtual]

Reimplemented in SmtpAfterPop.

void Smtp::rcptTo std::istream_iterator< std::string > &  begin,
std::istream_iterator< std::string > &  end
throw (smtp_error)

void Smtp::rcptTo const std::string &  email  )  throw (smtp_error)

void Smtp::reset  )  throw (smtp_error)

void Smtp::setFlags Flags  newFlags  ) 

static std::string Smtp::substLfWithCrLf const std::string &  str  )  [static, protected]

Member Data Documentation

std::string Smtp::additionalHeaders [protected]

Flags Smtp::flags [protected]

std::string Smtp::from [protected]

bool Smtp::m_bConnected [protected]

bool Smtp::m_bOwnLog [protected]

std::ofstream* Smtp::m_log [protected]

VirtStream* Smtp::m_out [protected]

ZeSocket Smtp::m_sock [protected]

std::list<std::string> Smtp::to [protected]

The documentation for this class was generated from the following files:
Generated on Thu Jun 16 00:13:15 2005 for Netlib for Abuse! by  doxygen 1.4.3