Hello:

   The problem is on calling the Helo():  That method
is "asynchroneous", meaning that it does not wait for
the server's response before returning; it will
eventually trigger the OnRequestDone event when the
server's response arrives.

   However, you are using the Open() method, which
already sends the HELO command itself.  To fix your
problem, just remove the call to Helo(), and leave
Open() followed by Mail().  Open and Mail are
"synchrenous" methods.

   The SmtpCli component, as all other ICS
components, have built-in sync and async methods. 
The sync methods are for quick and easy development:
 you make the call and it will return when completed.
 The async methods are more advanced and require an
event-driven approach to programming, similar to the
style of the VCL itself.  Although it is a bit more
complicated, we always recommend you use the async
methods, which give you more control, and help keep
your application more responsive.

    -dZ.


>------- Original Message -------
>From    : Victor Gooch[mailto:[EMAIL PROTECTED]
>Sent    : 11/30/2007 2:44:25 PM
>To      : twsocket@elists.org
>Cc      : 
>Subject : RE: [twsocket] Help with SmtpClient
>
 >I am using BCB6 with SmtpClient. My program
executes Open() then Helo() with no errors but when I
try to 
execute Mail() I get an error message that the
"Component is not Ready".  I have examined the property
settings several times but do not see why Mail() does
not work.  

is this a FAQ ?  Are there any suggestions?

thanks,
Victor
-- 
To unsubscribe or change your settings for TWSocket
mailing list
please goto 
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket

Visit our website at  http://www.overbyte.be 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to