登录
首页 » C# » C# pop3 邮件接收程序

C# pop3 邮件接收程序

于 2014-11-02 发布
0 223
下载积分: 1 下载次数: 0

代码说明:

private void Connect_Click(object sender, System.EventArgs e)        {            //将光标置为等待状态            Cursor cr = Cursor.Current;            Cursor.Current = Cursors.WaitCursor;            String a ,b,c;              //用110端口新建POP3服务器连接            Server = new TcpClient(PopServer.Text, 110);            Status.Items.Clear();             try            {                //初始化                NetStrm = Server.GetStream();                RdStrm = new StreamReader(Server.GetStream());                Status.Items.Add(RdStrm.ReadLine());                 //登录服务器过程                Data = "USER " Username.Text CRLF;                szData = System.Text.Encoding.ASCII.GetBytes(Data.ToCharArray());                NetStrm.Write(szData, 0, szData.Length);                Status.Items.Add(RdStrm.ReadLine());                 Data = "PASS " Password.Text CRLF;                szData = System.Text.Encoding.ASCII.GetBytes(Data.ToCharArray());                NetStrm.Write(szData, 0, szData.Length);                Status.Items.Add(RdStrm.ReadLine());                 //向服务器发送STAT命令,从而取得邮箱的相关信息:邮件数量和大小                Data = "STAT" CRLF;                szData = System.Text.Encoding.ASCII.GetBytes(Data.ToCharArray());                NetStrm.Write(szData, 0, szData.Length);                //Status.Items.Add(RdStrm.ReadLine());                 //改变按钮的状态                Connect.Enabled = false;                Disconnect.Enabled = true;                Retrieve.Enabled = true;                 //将光标置回原来状态                Cursor.Current = cr;             }            catch (InvalidOperationException err)            {                Status.Items.Add("Error: " err.ToString());            }        }

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 实验一 图像颜色特征提取
    图像颜色特征提取 颜色是彩色图像最重要的内容之一,被广泛用于图像检索中。但从图像中提取颜色特征时,很多算法都先要对图像进行量化处理。量化处理容易导致误检,并且产生的图像特征维数较高,不利于检索(qqwxcszcsefxzvczfeczx)
    2018-04-20 08:49:51下载
    积分:1
  • CS
    说明:  csharp的通讯程序 很好学习资料 希望大家能获得帮助(csharp' s a good learning materials communication program hope that we can get help)
    2009-11-29 23:16:12下载
    积分:1
  • dns-Audit
    A simple DNS auditing tool
    2014-01-04 15:28:26下载
    积分:1
  • Client-dotnet
    一个用于客户端和服务器端的客户端的简单程序,C#(one for the client and the server-client simple procedure, C#)
    2013-09-03 12:09:29下载
    积分:1
  • GetPacket
    这是一个用vc++编写的,用以截获以太网数据的代码。(This is a used vc++ Prepared for Ethernet data intercepted code.)
    2008-07-15 15:57:46下载
    积分:1
  • wlanscan
    Internet-Network WLAN Scan with NDIS Miniport and Much More
    2009-06-05 14:14:46下载
    积分:1
  • Getmacofremotemachine
    获取远程机器的MAc地址,运行环境VC++ (get MAC of remote machine)
    2009-05-10 17:27:13下载
    积分:1
  • Sniffer_code
    用vc实现的sniffer,没有使用winsock与winpcap。十分具有学习价值!(Vc realize with the sniffer, did not use winsock with winpcap. Very much with learning the value of!)
    2008-04-01 17:48:52下载
    积分:1
  • Zen_Macd
    缠论MACD面积MT4公式,给广大缠友提供一个合适的指标公式。祝愿天下缠友早日破缠得禅(On the MT4 wrapped formula tied to the majority of Friends provide a suitable index formula. Friends wish the world wrapped early break Zen Chande)
    2015-03-20 22:15:20下载
    积分:1
  • rgcistgr__statement__metropclitan
    用vc++实现的图案设计系统,共对图像处理研究方向的朋友参考学习!(Using vc pattern design system, a total of image processing research direction of friends reference learning!)
    2018-10-12 06:09:38下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载