VMime
SMTPCommand Class Reference

#include <SMTPCommand.hpp>

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() [1/2]

SMTPCommand ( const string text,
const string traceText 
)
protected

◆ SMTPCommand() [2/2]

SMTPCommand ( const SMTPCommand )
protected

Member Function Documentation

◆ AUTH() [1/2]

shared_ptr< SMTPCommand > AUTH ( const string mechName)
static

◆ AUTH() [2/2]

shared_ptr< SMTPCommand > AUTH ( const string mechName,
const std::string &  initialResponse 
)
static

◆ BDAT()

shared_ptr< SMTPCommand > BDAT ( const size_t  chunkSize,
const bool  last 
)
static

◆ createCommand()

shared_ptr< SMTPCommand > createCommand ( const string text,
const string traceText = "" 
)
static

◆ DATA()

shared_ptr< SMTPCommand > DATA ( )
static

◆ EHLO()

shared_ptr< SMTPCommand > EHLO ( const string hostname)
static

◆ getText()

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.

◆ getTraceText()

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.

◆ HELO()

shared_ptr< SMTPCommand > HELO ( const string hostname)
static

◆ MAIL() [1/2]

shared_ptr< SMTPCommand > MAIL ( const mailbox mbox,
const bool  utf8 
)
static

◆ MAIL() [2/2]

◆ NOOP()

shared_ptr< SMTPCommand > NOOP ( )
static

◆ QUIT()

shared_ptr< SMTPCommand > QUIT ( )
static

◆ RCPT()

◆ RSET()

shared_ptr< SMTPCommand > RSET ( )
static

◆ STARTTLS()

shared_ptr< SMTPCommand > STARTTLS ( )
static

◆ writeToSocket()

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.

References vmime::dynamicCast().


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