Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Apr : Re: connect to mailserver with TidTelnet, LastCmdResult
| Subject: | Re: connect to mailserver with TidTelnet, LastCmdResult |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 16 Apr 2007 09:14:18 |
"Peter Gustafsson" <sm5triATpassagenDOTse> wrote in message
news:4622a565@newsgroups.borland.com...
> I need to monitor exactly what ansver I get after
> each SMTP command. Can I do that with TidSMTP?
Yes. That is specifically what the LastCmdResult property was
designed for.
> I changed to TidTCPClient, I get the server greeting but I
> have to read LastCmdResult before the first sendCmd to get it.
That is what you are supposed to do. GetResponse() fills in
LastCmdResult accordingly with the data that was received.
> Now I have problem sending text to the server.
Then you are doing something else wrong. Please show your actual
code. Again, why are you not using TIdSMTP instead of TIdTCPClient
directly?
> With TidTelnet I could use SendCh, using SendCmd doesn't work.
Yes, it does. You are just not using it correctly yet.
Gambit