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.

?האם התשובה שקיבלתם הייתה מועילה

 הדפסת המאמר

קראו גם

Auto Block IP Windows 2003

Posted by directhostinguk, 05-06-2007, 02:39 PMAnyone got any ideas how to detect and block IP’s...

Script help with CSF - how to temporarily unblock IPs

Posted by sharmaine1111, 04-22-2009, 11:12 PMHello I'm trying to create a script or WHM plugin...

Cloudflare - too good to be true?

Posted by UberTricep, 11-02-2012, 08:24 AMSo I've been testing out cloud flare (for free) and it...

URL Rewrite

Posted by beachcompcom, 03-08-2010, 04:34 PMHi folks, I'm new to IIS7/Url rewrites. Im trying...

Website vs. Traceroute

Posted by libran, 09-17-2008, 06:11 PMHi guys, I'm having a problem with this. We are...