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.

Răspunsul a fost util?

 Tipărire

V-ar mai putea interesa și

How Change Owner?

Posted by hichkas, 07-17-2007, 07:59 AMHi How i Can Change Owner to User! In VPS? Posted by...

picture editing for members

Posted by rumrunner439, 09-22-2008, 02:10 PMok i was wanting to add a photo editor like inkscape...

Warning: shell_exec() has been disabled for security reasons

Posted by ashish1987, 09-15-2007, 12:39 AMHey I installed status2k on my server and i am...

Create A Real Time Web Page

Posted by batulang, 08-14-2006, 06:34 AMHi Everybody, I was thinking is that possible to...

iframe help with internet explorer

Posted by galleline, 02-20-2011, 10:05 AMI have web page with embed video player and i have put...