本帖最后由 z_boy 于 2010-04-06 18:36:55 编辑

解决方案 »

  1.   

    smtp邮件发送类,支持ssl.
    http://download.csdn.net/source/2176969
      

  2.   

    smtp 是发送邮件的协议 不用登录的  
    helo  from to data quit 这几个够了pop3才是接受的 要登录和密码这些命令
      

  3.   


    之前我有telnet,命令是没有问题的,可不知怎么回事,这么发过去就是不认!
      

  4.   


    我telnet时用我的邮箱发邮件他要求登陆的权限...
      

  5.   

    现在的SMTP 服务器 一般要账号登录的
      

  6.   

    登录模式有auth login和auth plain,具体的自己查查
      

  7.   

    新浪的,是auth login,我不发helo就能识别auth login,我发了helo就只识别helo,不识别auth login了...他只识别一条命令...真让我晕死...
      

  8.   

    send ehlo user_name
    send auth login
    send user_name //   这个用户名 要发送通过BASE64加密之后的用户名
    send password  //   密码也要发送加密后的密码
      

  9.   

    这是我以前写的一段登陆CODECString cmd = "ehlo ";
    cmd += ::AfxAppPara.AfxUSER.UserName;
    cmd += "\r\n"; CString readInfo;
    this->SendCmdToServer(cmd);
    this->ReadResponceFromServer(readInfo, 1024); // 250
    $
    readInfo.Empty();
    this->SendCmdToServer("auth login\r\n");
    this->ReadResponceFromServer(readInfo, 1024); // 334 encodeLen = 1024;
    if(!::Base64Encode((const BYTE*)AfxAppPara.AfxUSER.UserName.GetBuffer(AfxAppPara.AfxUSER.UserName.GetLength()),
           AfxAppPara.AfxUSER.UserName.GetLength(),(BYTE*)encodeUserName, &encodeLen)){
    MessageBox(NULL, "error: username", NULL, MB_OK);
    return;
    }
    encodeUserName[encodeLen + 1] ='\0';
    cmd = this->encodeUserName;
    cmd += "\r\n"; readInfo.Empty();
    this->SendCmdToServer(cmd);
    this->ReadResponceFromServer(readInfo, 1024); if(!::Base64Encode((const BYTE*)::AfxAppPara.AfxUSER.Password.GetBuffer(AfxAppPara.AfxUSER.Password.GetLength()),
           AfxAppPara.AfxUSER.Password.GetLength(), (BYTE*)this->encodePassword, &this->encodeLen)){
    MessageBox(NULL, "error: password", NULL, MB_OK);
    return;
    }
    this->encodePassword[encodeLen + 1] ='\0';
    cmd = this->encodePassword;
    cmd += "\r\n"; readInfo.Empty();
    this->SendCmdToServer(cmd);
    this->ReadResponceFromServer(readInfo, 1024);
      

  10.   


    你确定你是25端口? 110是pop3的 
    我试过telnet服务器发邮件和接收 
    没问题的 发邮件不需要登录的
      

  11.   

    一看代码就知道,肯定学过mfc,写的很好,能把完整的代码发我一份吗,万分感激[email protected]