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.

Je li Vam ovaj odgovor pomogao?

 Ispiši članak

Također pročitajte

Wildcard Question

Posted by Greedisgood, 07-06-2007, 08:47 AMHi, I was wondering if an expert could confirm if...

user avahi

Posted by sherwood, 04-22-2009, 11:59 AMHi, I seem to be getting emails from LFD about the...

Eaccellerator?

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

Need to Delete a Cronjob via SSH

Posted by epic1231, 03-23-2007, 11:12 AMI have a cronjob that is still entered in my server, but...

Any PHP library to create .ico? Or just to convert a PNG to ICO?

Posted by yangyang2036, 09-21-2008, 09:17 PMSearched google with nothing relevant. Posted by...