VMime
SMTPCommand Class Reference
Inheritance diagram for SMTPCommand:
Collaboration diagram for SMTPCommand:

Public Member Functions

virtual void writeToSocket (shared_ptr< socket > sok, shared_ptr< tracer > tr)
 
virtual const string getText () const
 
virtual const string getTraceText () const
 

Static Public Member Functions

static shared_ptr< SMTPCommandHELO (const string &hostname)
 
static shared_ptr< SMTPCommandEHLO (const string &hostname)
 
static shared_ptr< SMTPCommandAUTH (const string &mechName)
 
static shared_ptr< SMTPCommandAUTH (const string &mechName, const std::string &initialResponse)
 
static shared_ptr< SMTPCommandSTARTTLS ()
 
static shared_ptr< SMTPCommandMAIL (const mailbox &mbox, const bool utf8)
 
static shared_ptr< SMTPCommandMAIL (const mailbox &mbox, const bool utf8, const size_t size)
 
static shared_ptr< SMTPCommandRCPT (const mailbox &mbox, const bool utf8)
 
static shared_ptr< SMTPCommandRSET ()
 
static shared_ptr< SMTPCommandDATA ()
 
static shared_ptr< SMTPCommandBDAT (const size_t chunkSize, const bool last)
 
static shared_ptr< SMTPCommandNOOP ()
 
static shared_ptr< SMTPCommandQUIT ()
 
static shared_ptr< SMTPCommandcreateCommand (const string &text, const string &traceText="")
 

Protected Member Functions

 SMTPCommand (const string &text, const string &traceText)
 
 SMTPCommand (const SMTPCommand &)
 
- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

A SMTP command, as sent to server.

Constructor & Destructor Documentation

SMTPCommand ( const string text,
const string traceText 
)
protected
SMTPCommand ( const SMTPCommand )
protected

Member Function Documentation

shared_ptr< SMTPCommand > AUTH ( const string mechName)
static
shared_ptr< SMTPCommand > AUTH ( const string mechName,
const std::string &  initialResponse 
)
static
shared_ptr< SMTPCommand > BDAT ( const size_t  chunkSize,
const bool  last 
)
static
shared_ptr< SMTPCommand > createCommand ( const string text,
const string traceText = "" 
)
static
shared_ptr< SMTPCommand > DATA ( )
static
shared_ptr< SMTPCommand > EHLO ( const string hostname)
static
const string getText ( ) const
virtual

Returns the full text of the command, including command name and parameters (if any).

Returns
command text (eg. "RCPT TO:<vincent@kisli.com>")

Reimplemented in SMTPCommandSet.

const string getTraceText ( ) const
virtual

Returns the full text of the command, suitable for outputing to the tracer.

Returns
trace text (eg. "LOGIN myusername ***")

Reimplemented in SMTPCommandSet.

shared_ptr< SMTPCommand > HELO ( const string hostname)
static
shared_ptr< SMTPCommand > MAIL ( const mailbox mbox,
const bool  utf8 
)
static
shared_ptr< SMTPCommand > MAIL ( const mailbox mbox,
const bool  utf8,
const size_t  size 
)
static
shared_ptr< SMTPCommand > NOOP ( )
static
shared_ptr< SMTPCommand > QUIT ( )
static
shared_ptr< SMTPCommand > RSET ( )
static
shared_ptr< SMTPCommand > STARTTLS ( )
static
void writeToSocket ( shared_ptr< socket sok,
shared_ptr< tracer tr 
)
virtual

Sends this command to the specified socket.

Parameters
soksocket to which the command will be written
trtracer

Reimplemented in SMTPCommandSet.


The documentation for this class was generated from the following files: