Hello. I'm trying to make a smtp mail client that will send easy emails.
I connect to the server, receive the header, and send the 'helo' but there are multiple lines of text sent back at me after that. My loop to receive looks like this:
send(theSocket, "helo\n", 6, 0);
int retcode = recv(theSocket, buffer, 1024, 0);
while (retcode > 0)
printf("Buffer size = %d\n Buffer Message = %s\n", retcode, buffer);
retcode = recv(theSocket, buffer, 1024, 0);
Although there are 4 lines returned by the server the only thing I get is this:
Buffer size = 32
Buffer Message = 250 smtp811.mail.ukl.yahoo.com
Is there anyway to get all of the lines?