Creates an SmtpCommand object to handle command within the context of server.server cannot be null.

This function rejects commands issued while the server is shutting down. If a command passes this hurdle, it will be executed to completion, even if the server starts shutting down. This implies that if we're receiving a message body when the shutdown command is given, we will receive and inject the message, as RFC 1047 suggests.

bool SmtpCommand::done() const

Returns true if this command has finished its work, and false otherwise.

void SmtpCommand::emitResponses()

Outputs the response for this command, including the number and trailing CRLF.

void SmtpCommand::finish()

Records that this command is finished and tells the SMTP server to emit responses and generally get on with life. The response may be sent, and SMTP::execute() should not call execute() again.

bool SmtpCommand::ok() const

Returns true if this command has completed with a non-error response code, true if it hasn't completed, and false if it has completed with an error code. Toggles to true again after emitResponses().

Records that the (three-digit) response code for this command is r, that enh is either null (the default) or an enhanced status code as defined in RFC 2034, and that s is to be one of the text lines sent. s should not have a trailing CRLF.

If r is 0, the existing response code is not changed. Similarly, if enh is null, the existing enhanced respons code is not changed.