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.

Hasznosnak találta ezt a választ?

 Kinyomtatja ezt a cikket

Olvassa el is

Loading proress bar before iframe

Posted by bambinou, 11-16-2012, 11:39 AMHello, I have an hotel booking affiliate iframe that...

Script PHP to check links automatically - backlink checker

Posted by JaneP, 10-22-2012, 12:08 PMHello forum Sometimes it is necessary to check every time...

Connection Partially Encrypted

Posted by letnes, 09-16-2008, 11:03 PMI get the Connection Partially Encrypted message when I...

picture editing for members

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

Help wanted: ASP.NET / mono setup

Posted by raqtweak.com, 03-25-2007, 10:52 AMHi all, I'm looking for volounteers for the...