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

C# pop3 邮件接收程序

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

  • DNS_Lookup
    窗口方式下域名解析,DNS域名解析系统。(Window mode, DNS, DNS domain name system.)
    2009-11-02 13:08:46下载
    积分:1
  • uhort
    一个可以切分bin格式的图形文件的程序,推荐()
    2017-10-27 11:11:12下载
    积分:1
  • lyzz23
    本程序以动态的方式给对话框加载背景图,给人耳目一新的感觉()
    2018-04-28 12:12:12下载
    积分:1
  • C# IPC 之 Socket 进间通信(TCP方式) 源码
    C# IPC 之 Socket 进程间通信(TCP方式) 源码
    2013-09-14下载
    积分:1
  • winsock5
    说明:  本人毕业时班里集体做局域网聊天工具,当时我一共收集了6个,这是第五个(I graduated class of collective LAN chat tools to do when I collected a total of 6, this is the fifth)
    2008-09-26 21:49:40下载
    积分:1
  • afti
    A new method of propagation for computer viruses is here presented, Automated File Transfer Infection (AFTI). This method is specific for the Microsoft® Windows® NT/2000/XP/Server 2003 platforms, albeit it may be extended to the 95/98/ME systems as well, and even other Operating Systems. It is based upon WinSock 2 hooking with the Service Provider Interface (SPI).(A new method of propagation for computer vi ruses is here presented. Automated File Transfer Infection (AFTI). Thi 's method is specific for the Microsoft)
    2007-04-14 12:37:29下载
    积分:1
  • Winpcap-demo
    一个简单的Winpcap抓包示例程序,能显示多网卡信息,能分别数据链路层和网络层的报文信息(A simple Winpcap packet capture sample program can display a multi-card information, respectively, the data link layer and network layer packet information)
    2012-04-17 10:41:20下载
    积分:1
  • curl-7.65.1
    Duilib 是一款强大的界面开发工具,可以将用户界面和处理逻辑彻底分离,极大地提高用户界面的开发效率,遵循bsd协议。(Duilib is a powerful interface development tool, which can completely separate the user interface and processing logic, greatly improve the development efficiency of user interface, and follow the BSD protocol.)
    2020-06-19 19:40:02下载
    积分:1
  • 6037414
    修改默认的滚动条样式,类似XP风格,并有动感,()
    2018-04-27 16:09:08下载
    积分:1
  • Chat
    在VS2005的编程环境下,利用套接字的编程原理,可以实现网络聊天功能。(On the basic of VS2005, take advantage of the principle of Socket to achieve the ability to communicate online.)
    2014-04-11 09:18:47下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载