K
Lösung:
Man muß einem E-mail-Client nach jedem Eingang eine Antwort zurückgeben, damit er weiter sendet:
int svr::SendResponse(SOCKET ClientSocket, int iResponseType)
{
char buf[100];
int len;
if (iResponseType == 220)
sprintf_s(buf, "220 %s Welcome to %s %s \r\n", "LCD", "eml", "1.0");
else if (iResponseType == 221)
strcpy_s(buf, "221 Service closing transmission channel\r\n");
else if (iResponseType == 250)
strcpy_s(buf, "250 OK\r\n");
else if (iResponseType == 354)
strcpy_s(buf, "354 Start mail input; end with <CRLF>.<CRLF>\r\n");
else if (iResponseType == 501)
strcpy_s(buf, "501 Syntax error in parameters or arguments\r\n");
else if (iResponseType == 502)
strcpy_s(buf, "502 Command not implemented\r\n");
else if (iResponseType == 503)
strcpy_s(buf, "503 Bad sequence of commands\r\n");
else if (iResponseType == 550)
strcpy_s(buf, "550 No such user\r\n");
else if (iResponseType == 551)
strcpy_s(buf, "551 User not local. Can not forward the mail\r\n");
else
sprintf_s(buf, "%d No description\r\n", iResponseType);
len = (int)strlen(buf);
send(ClientSocket, buf, len, 0);
return iResponseType;
}