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.

Ha estat útil la resposta?

 Imprimeix aquest Article

Llegir també

Can't upload via php script

Posted by JohnDoe_Cro, 06-28-2008, 01:58 PMHello all, I am having problems on my server... I...

Eaccellerator?

Posted by dragon2611, 01-12-2008, 09:13 PMI believe I understand what it does (cache php scripts...

aletia reseller

Posted by hostchecker, 09-27-2001, 05:36 PMwhas the URL for aletia reseller plans? Posted by...

Cannot open database asp.net

Posted by Faiyaz, 09-22-2008, 03:02 PMCannot open database "DATABASENAME" requested by the login....

need urgent help!

Posted by Jerenn, 07-17-2007, 07:54 AMI am really sorry cause I couldnt get where to make this...