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

C# pop3 邮件接收程序

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

  • zicm__nice
    一个不错的office 2003 界面类(A nice office 2003 interface class)
    2018-11-27 20:24:08下载
    积分:1
  • netstatp
    类似Windows的netstat程序的程序 (An app which is like to windowss netstat)
    2021-04-03 22:29:04下载
    积分:1
  • udf1
    说明:  定义了一个用于控制扭转和弯曲周期运动的udf程序,用于计算fluent中动边界案例。(A UDF program is defined to control the periodic motion of torsion and bending, which is used to calculate the dynamic boundary case in fluent.)
    2021-04-13 20:58:56下载
    积分:1
  • 167574
    list of viterbi编译码算法,编码结构能够任意变化,对初学者来说不错()
    2017-12-30 22:24:38下载
    积分:1
  • tcp 远程桌面实例源码
    tcp 远程桌面实例源码
    2014-06-19下载
    积分:1
  • net_programme_3stpart
    《VC++网络通信编程实例案例精选》源代码_第三部分("VC network communications programming examples selected cases" source code _ the third part)
    2007-02-27 10:30:38下载
    积分:1
  • 多人聊天程序
    基于TCP/IP的多人聊天程序(包含服务器和客户端)( Chat the procedure based on the TCP/IP multi- people (to contain server and customer end) )
    2004-07-03 23:37:55下载
    积分:1
  • network_report
    计算机网络的实验报告和源码,包含聊天软件的源玛(An experimental computer network reports and source code, including chat software source ma)
    2009-01-03 16:51:44下载
    积分:1
  • Server
    一个类似飞鸽传书的小程序 其中的SERVER端 一会上传Client(studay ..)
    2012-06-05 11:47:56下载
    积分:1
  • Csharp-internet-programming
    C#网络编程基础一书的所有例子,涵盖从SOCKET到加密的所有功能,值得学习(C# Network Programming, a book of all the examples, ranging from SOCKET to encrypt all the features, it is worth learning)
    2011-12-23 17:31:39下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载