smtp发信HELO成功后其他命令502错误
程序代码:
printf("连接成功\n"); n=recv(s,name,sizeof(name),0); name[n]='\0'; printf("%s\n",name); ZeroMemory(name,1000); strcpy_s(name,"HELO hi\r\n"); if(send(s,name,sizeof(name),0)==SOCKET_ERROR) { printf("发送helo失败%d\n",WSAGetLastError()); } n=recv(s,name,sizeof(name),0); name[n]='\0'; if(n==SOCKET_ERROR) { printf("接收数据失败%d\n",WSAGetLastError()); } printf("%s",name); ZeroMemory(name,1000); strcpy_s(name,"auth login\r\n"); if(send(s,name,sizeof(name),0)==SOCKET_ERROR) { printf("发送auth login失败%d\n",WSAGetLastError()); } n=recv(s,name,sizeof(name),0); name[n]='\0'; printf("%s",name);
telnet上面一切正常,vc上面HELO成功之后所有命令都提示502错误
连接成功
220 Anti-spam GT for Coremail System (163com[20121016])
250 OK
502 Error: command not implemented
请按任意键继续. . .