Hi all,
I am trying to use TcpCliet to create a small application to conect to my server (FreeBSD Unix) on port 25 (im not trying to send email, just using it for testing). I am used to doing this with Unix TCP sockets (c++) but with windows (XP) (c++ builder) I cant quite get the TcpClient component to work correctly.
I have used TcpClient in the past, but cant remember how to implement the 'onXxxxx' methods?? Or maybe im mixing Unix C++ with Builder code??? My form just has a memo box (connection window), an edit box (4 sending), and 3 buttons - connect, disconnect, and send (to send text)
I can get the server SMTP welcome message (i.e. ESMTP Sendmail vblah.. blah ..blah) but cannot send the "helo me" message? when i click the 'send' button, nothing appears to happen? I have used TcpClient->Socket->ReceiveText() and SendText() to do this so far, but have no real idea how to use them correctly - any success i've had has been based on prior knowledge of socket! Or are the problems im having because i am connection to a Unix system?
If anyone Can tell me how i should go about doing this with either TcpClient->Socket or another componet (or method) i would be more than grateful. I just need to know the easiest/best way to use/do this in my current situation, and how it should be implemented (which 'onXxx' methd should contain what code).
A small example would also be most welcome.
Regards,
J@yb0t
"Always know what you say, but don't always say what you know!"
I am trying to use TcpCliet to create a small application to conect to my server (FreeBSD Unix) on port 25 (im not trying to send email, just using it for testing). I am used to doing this with Unix TCP sockets (c++) but with windows (XP) (c++ builder) I cant quite get the TcpClient component to work correctly.
I have used TcpClient in the past, but cant remember how to implement the 'onXxxxx' methods?? Or maybe im mixing Unix C++ with Builder code??? My form just has a memo box (connection window), an edit box (4 sending), and 3 buttons - connect, disconnect, and send (to send text)
I can get the server SMTP welcome message (i.e. ESMTP Sendmail vblah.. blah ..blah) but cannot send the "helo me" message? when i click the 'send' button, nothing appears to happen? I have used TcpClient->Socket->ReceiveText() and SendText() to do this so far, but have no real idea how to use them correctly - any success i've had has been based on prior knowledge of socket! Or are the problems im having because i am connection to a Unix system?
If anyone Can tell me how i should go about doing this with either TcpClient->Socket or another componet (or method) i would be more than grateful. I just need to know the easiest/best way to use/do this in my current situation, and how it should be implemented (which 'onXxx' methd should contain what code).
A small example would also be most welcome.
Regards,
J@yb0t
"Always know what you say, but don't always say what you know!"