Sending commands to a socket (C++)

Posted by LindonNetworks, 09-19-2008, 05:53 PM
I'm trying to write an SMTP wrapper and I'm connecting to the mail server with winsock and connect successfully but how do I send the commands? send(lhSocket,"HELO\\r",strlen("HELO\\r"),0); Does it need to be \n to end the command?

Posted by DigitalLinx, 09-20-2008, 08:22 AM
You're escaping the return with \\r, return (\r) and newline (\n) are a bit different you might want to use both like this Also note that strlen() returns when it hits a NULL character, it might be a better idea to use sizeof() in this case. Last edited by DigitalLinx; 09-20-2008 at 08:26 AM.

Bu cevap yeterince yardımcı oldu mu?

 Bu dökümanı yazdır

Also Read

Bind an IP to a UID?

Posted by zawk, 06-22-2008, 11:34 AMI Finally had a question worth asking so I signed up......

remote reboot, how?

Posted by selbach, 05-06-2007, 07:59 AMnow, ive been looking at this but cant find out how to do...

Question for Nameserver

Posted by tinhnho, 07-16-2007, 11:57 PMHi everyone, I installed DA, and setup my ip...

File Integrity Check

Posted by taydu3000, 01-15-2008, 04:01 AMAre the following file from Cpanel? Cpanel just update...

upgrade MySql and PHP

Posted by paul-naama, 09-16-2007, 04:55 AMApparently because i wanted LXADMIN HIAB they had to...