#define sckClosed 0 #define sckOpen 1 #define sckListening 2 #define sckConnectionPending 3 #define sckResolvingHost 4 #define sckResolved 5 #define sckConnecting 6 #define sckConnected 7 #define sckClosing 8 #define sckError 9 #DEFINE crlf CHR(13)+CHR(10) thisform.tcpClient.Protocol = 0 && 0=TCP Protocol, 1=UDP thisform.tcpClient.RemoteHost = "mailserver.dsigroup.com" thisform.tcpClient.RemotePort = 25 && smtp port. ThisForm.tcpClient.Object.Connect() WAIT WINDOW '' TIMEOUT .1 nn = 0 checkLop =20 DO WHILE ThisForm.tcpClient.Object.State <> 7 AND checkLop<nn nn = nn+1 ENDDO thisform.tcpClient.Object.senddata("HELO 10.1.1.150" + crlf) thisform.tcpClient.Object.senddata("craigmoore@dsigroup.com" + crlf) thisform.tcpClient.Object.senddata("Mail From:"+lcFrom + crlf) thisform.tcpClient.Object.senddata("RCPT TO:" + lcTo + crlf) =Inkey(.001) thisform.tcpClient.Object.senddata("DATA" + crlf) thisform.tcpClient.Object.senddata("From:" + lcFrom + crlf) thisform.tcpClient.Object.senddata("To:"+ lcTo + crlf) thisform.tcpClient.Object.senddata("Subject:"+lcSubject + crlf) thisform.tcpClient.Object.senddata(crlf + lcText + crlf) thisform.tcpClient.Object.senddata("." + crlf) =Inkey(.001) thisform.tcpClient.Object.senddata("QUIT")>Hi,