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

Referenced by createCommand(), and SMTPCommand().

◆ SMTPCommand() [2/2]

SMTPCommand ( const SMTPCommand & )
protected

References SMTPCommand().

Member Function Documentation

◆ AUTH() [1/2]

shared_ptr< SMTPCommand > AUTH ( const string & mechName)
static

References createCommand().

◆ AUTH() [2/2]

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

References createCommand().

◆ BDAT()

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

References createCommand().

◆ createCommand()

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

Creates a new SMTP command with the specified text.

Parameters
textcommand text
Returns
a new SMTPCommand object

References SMTPCommand().

Referenced by AUTH(), AUTH(), BDAT(), DATA(), EHLO(), HELO(), MAIL(), NOOP(), QUIT(), RCPT(), RSET(), and STARTTLS().

◆ DATA()

shared_ptr< SMTPCommand > DATA ( )
static

References createCommand().

◆ EHLO()

shared_ptr< SMTPCommand > EHLO ( const string & hostname)
static

References createCommand().

◆ 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

References createCommand().

◆ MAIL() [1/2]

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

References MAIL().

Referenced by MAIL().

◆ MAIL() [2/2]

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

◆ NOOP()

shared_ptr< SMTPCommand > NOOP ( )
static

References createCommand().

Referenced by SMTPTransport::noop().

◆ QUIT()

shared_ptr< SMTPCommand > QUIT ( )
static

References createCommand().

◆ RCPT()

◆ RSET()

shared_ptr< SMTPCommand > RSET ( )
static

References createCommand().

◆ STARTTLS()

shared_ptr< SMTPCommand > STARTTLS ( )
static

References createCommand().

◆ 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.


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