|Subject:||Re: tidSmtp "state machine" question|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Tue, 17 Jan 2006|
"arthur hoornweg" <firstname.lastname@example.org> wrote in message
> I have a problem with tidsmp, or more exactly, with "how to
> find out what went wrong during the transmission of mail."
Attach one of the TLidLog...components to the TIdSMTP, or use an external
packet sniffer such as Ethereal http://www.ethereal.com), to look at the
raw SMTP commands and responses.
> A SMTP session is a state machine: several steps are performed
> sequentially until a mail is sent. During each step errors may
That is true, though it is a little more complicated than that. SMTP has 3
states, and certain commands can only be issued inside of specific states,
and certain commands have to be issued in order to switch from one state to
> AFAIK, tidsmtp only gives me the possibilities to call the "send"
> method, and to query the "lastcmdresult" property if anything goes
If anything goes wrong, an exception is thrown.
> The property Lastcmdresult only gives me an error code, but
> not the information at what piont of the session it occurred !!!
For what you ask, Indy would have to be updated to record every command that
is issued. Which in turn would effect every Indy component that uses the
command/response architecture. You could just keep track of that stuff
yourself without having to re-write Indy. If not with the TIdLog...
components, then simply write your own Intercept class that keeps track of
the last command that was sent.
tidSmtp "state machine" question posted by arthur hoornweg on Mon, 16 Jan 2006