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.

Ця відповідь Вам допомогла?

 Роздрукувати цю статтю

Також прочитайте

disable php functions?

Posted by Calibaba, 09-15-2007, 06:28 PMDoes the below look good for a private server (linux,...

How safe is this solution?

Posted by bambinou, 10-31-2012, 05:43 PMHello, I need some feedback from you please before I...

Redirecting a subdomain to a folder on the main domain?

Posted by Max Renn, 11-12-2012, 02:46 AMHi all I hope someone can help me with this. Do any...

DNS & MX RECORDS ON A CPANEL WHM VPS SERVER

Posted by Harry E, 01-13-2008, 10:37 AMHello i have been having probelems for the past few...

Do I really need SpamAssassin?

Posted by dr00t, 09-18-2008, 03:26 AMI have a relatively low-end server that is running cPanel...