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

C# pop3 邮件接收程序

于 2014-11-02 发布
0 195
下载积分: 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 个回复

  • chatserver
    简单的网络通信,一个客户端,一个服务器端(winsock )
    2009-05-11 11:13:16下载
    积分:1
  • zxshell3
    说明:  后门zxshell3.0 一个功能强大的后门(Zxshell3.0 a powerful backdoor backdoor)
    2008-09-27 14:29:31下载
    积分:1
  • Traffic
    对网络的流量进行监测,会很好的对网络端口的流量进行监测,绝对可以完整运行(Traffic on the network to be monitored, will be well on network port flow monitoring, absolute integrity can be run)
    2012-04-27 20:15:36下载
    积分:1
  • Emulator
    驱动层抓取网卡数据代码,并可以修改数据包内容(Crawl layer data-driven card code, and can modify the contents of data packets)
    2009-04-01 00:06:26下载
    积分:1
  • ZFQXOX
    自实现提示窗口,可以实现与XP风格的提示窗口类库,基于MFC,()
    2018-04-29 06:13:18下载
    积分:1
  • Windows与通信序设计_
    windows网络编程,设计到基本的socket入门,异步socket,iocp,后面还有驱动,(Windows network programming, design to the basic socket entry, asynchronous socket, iocp, there are drivers behind.)
    2020-06-21 12:00:02下载
    积分:1
  • VC-OPC-client
    说明:  基于VC的OPC客户端软件研究与实现.......(The OPC-based VC research and implementation of client software ....... )
    2011-04-16 11:52:41下载
    积分:1
  • C#实现UDP打洞即时视频聊天
    C#实现UDP打洞即时视频聊天
    2014-01-15下载
    积分:1
  • mytrace.c
    This the simplest reference of mytrace
    2006-06-21 18:48:11下载
    积分:1
  • NDISprogromer
    说明:  NDIS协议驱动程序源代码清单。NDIS协议驱动程序源代码用C语言完成。文档里含有全部代码。(agreement NDIS driver source code list. Agreement NDIS driver source code using C language completed. Documents containing all the code.)
    2006-04-22 16:07:30下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载