TIdSMTPMessages
Implements a container for replies to SMTP command verbs.
TIdSMTPMessages = class(TPersistent)
Unit
Description
TIdSMTPMessages is TPersistent descendant that specifies propetiesd and methods needed to implement a container for SMTP messages used as replies to SMTP Command verbs.
Represents messages used when a SMTP server performs the SMTP DATA command.
Description
DataReplies is a
TIdSMTPDataReplies property that represents messages sent when the SMTP server performs the DATA command verb. DataReplies is used in the TIdSMTPServer.CommandData action handler to access the StartDataReply and EndDataReply propeties.
Represents the error message used when a command action does not have a corresponding event handler.
property ErrorReply: string;
Description
ErrorReply is a String property that represents the SMTP Server response written to the client connection when a TIdCommand.OnCommand event handler does not have a corresponding TIdBasicHandler event handler in the
TIdSMTPServer implementation for the .
The default behavior in TIdSMTPServer is to send an RFC response with the numeric error code 500 concatenated with the value in ErrorReply. The command action handler and server event handler combinations used in TIdSMTPServer include the following:
- CommandHELP - OnCommandHELP
- CommandSOML - OnCommandSOML
- CommandSEND - OnCommandSEND
- CommandSAML - OnCommandSAML
- CommandVRFY - OnCommandVRFY
- CommandEXPN - OnCommandEXPN
- CommandTURN - OnCommandTURN
The default value for ErrorReply is RSSMTPSvrCmdGeneralError, as assigned in the Create constructor.
Indicates greeting messages used in the Server implementation.
Description
Greeting is a
TIdSMTPGreeting property that indicates the greeting messages used by a SMTP server implementation, and their content. Greeting contains String properties like EHLONotSupported, HelloReply, NoHello, and AuthFailed. Greeting also contains a multi-line response EHLOReply.
Represents the message used in response to SMTP NOOP and RSET commands.
property NoopReply: string;
Description
NoopReply is a String property that represents the message used in response to command actions performed for the SMTP NOOP command verb or the SMTP RSET command verb when used prior to starting a mail transaction. The default value for NoopReply is the constant value
RSSMTPSvrOk as assigned in the
Create constructor.
SMTP Protocol reply sent when a client is not authorized to perform the request command.
property NotLoggedIn: String;
Description
NotLoggedIn is a String property that represents the SMTP protocol reply sent to a client connection when authorization is required top perform the SMTP command requested. NotLoggedIn is used in the command handler for the SMTP MAIL command when AuthMode is True. NotLoggedIn is given the value from the resource string RSSMTPNotLoggedIn in the constructor for the class instance.
Seelso: Create, AuthMode, RSSMTPNotLoggedIn
Indicates the message used for the SMTP QUIT command.
property QuitReply: string;
Description
QuitReply is a String property that indicates the message used in response to a
TIdCommand action handler for the SMTP QUIT command verb. The default value for QuitReply is the constant value
RSSMTPSvrQuit as assigned in the
Create constructor.
Represents messages used for SMTP MAIL and RCPT commands.
Description
RcpReplies is a
TIdSMTPRcpReplies property that contains message that may be used in conjunction with SMTP commands verbs that involve recipient addresses. RcpReplies represents the AddressOkReply, AddressErrorReply, and AddressWillForwardReply responses used in command handlers and event handlers for the SMTP MAIL and RCPT commands.
Represents the value for the "Received:" header added to forwarded mail.
property ReceivedHeader: string;
Description
ReceivedHeader is a String property that contains a value to prepended mail messages received on the SMTP server that require forwarding to address outside the domain for the server.
ReceivedHeader is generated im mail messages as a "Received:" RFC message header. ReceivedHeader is significant in Relay and Gateway applications, and must never alter an existing header value in a mail message. The gateway SHOULD indicate the environment and protocol in the "via" clauses of Received field(s) that it supplies.
"Received:" headers in messages originating from other environments may not conform exactly to this specification.
The default value for ReceivedHeader is the constant value RSSMTPSvrReceivedHeader, as assigned in the Create constructor.
Identifies the response used for the SMTP RSET command.
property RSetReply: string;
Description
RSetReply is a String property that represents the message used in response to the SMTP RSET command verb after mail transaction has been initiated.
The default value for RSetReply is the constant value RSSMTPSvrOk, as assigned in the Create constructor.
SMTP protocol reply used for an invalid SMTP state for the requested command.
property SequenceError: string;
Description
SequenceError is a String property that represents the SMTP protocol reply sent when an operation has been requested that is out of sequence. SequenceError indicates that another required SMTP command is required prior to the execution of the current SMTP command. SequenceError is normally sent to the client connection when a command handler checks the TIdSMTPServerThread.SMTPState for a required value for the operation.
The default value for SequenceError is the resource string RSSMTPSvrBadSequence as assigned in the Create constructor.
Represents the message used in response to a syntax error in an SMTP command.
property SyntaxErrorReply: string;
Description
SyntaxErrorReply is a String property that identifies the message used in response to a syntax error in a SMTP command, an the command or parameter values not be parsed or recognized by
TIdCommandHandler instances for the Server implementation. The default value for SyntaxErrorReply is the constant value
RSSMTPSvrCmdGeneralError, as assigned in the
Create constructor.
Identifies the SMTP Server acting as the mail transfer agent.
property XServer: string;
Description
XServer is a String property that represents an experimental RFC message header added to mail received using the SMTP DATA command verb. XServer indicates the Server acting as the mail transfer agent, and provides additional information that can be used in debugging the operations of an SMTP server.
XServer is used in the TIdSMTPServer.OnReceiveMessage action handler, and added to mail received using a TIdSMTPServer.ReceiveMode of rmMessage or rmMessageParsed.
Copies the properties of one Object instance to another.
procedure Assign(Source: TPersistent); override;
Parameters
Source: TPersistent
Object instance containing values to be copied.
Description
Assign is an overridden procedure in
TIdSMTPMessages that copies the property values in Source to the current object instance. Assign calls the inherited Assign method.
Assign checks whether the Source parameter specifies another TIdSMTPMessages instance, and if so, copies the values of the NoopReply, RSetReply, QuitReply, ErrorReply, ReceivedHeader, XServer, and SyntaxErrorReply properties. Assign also calls the Assign method for object instances in the Greeting, RcpReplies, and DataReplies properties.
If Source is not a TIdSMTPMessages instance, Assign calls the inherited method, which assigns properties from any object that specifies how to copy using the AssignTo method.
Constructor for the object instance.
Description
Create is the constructor for the object instance, and calls the inherited Create method. Create assigns the default constant values used in the following properties:
Create also allocates resources used in the following properties:
Frees the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees resources allocted in the
Create constructor for the
Greeting,
RcpReplies, and
DataReplies properties. Destroy calls the inherited Destroy method prior to exiting from the method.