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

C# pop3 邮件接收程序

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

  • HideLyc
    注:用VS2012才能打开。 写的一个覆盖电影字幕的应用。在欣赏欧美大片的同时,运行此软件遮挡字幕,有利于提高听力。(A prog that can cover Lyrics of the movie in order to help you raise your listening ability. )
    2013-05-31 21:41:51下载
    积分:1
  • tcpip
    tcp/ip通信用VC++6.0开发的 基于三层结构(tcp/ip communication VC++ 6.0 developed based on the three-tier architecture)
    2008-03-18 13:58:01下载
    积分:1
  • LanChat
    局域网聊天工具,网络编程课程作业,需要的下载(LAN chat tools, web programming course work, you need to download)
    2010-12-10 03:26:35下载
    积分:1
  • AsyncTcp
    一般的聊天程序都是使用socket方式通讯的。对于一个聊天程序来说一般是一个服务器用来中转消息,然后是多个客户端通过连接服务器来消息交换。(General chat programs are using the socket mode of communication. For a chat program, it is generally a server used to relay the message, then multiple clients to connect to the server through the exchange of messages.)
    2013-08-26 10:10:08下载
    积分:1
  • 111
    说明:  实时视频传输有很大的实用价值,对采集到的原始视频信息进行压缩编码,获取己编码视频流是实现实时视频传输和QoS研究的关键。(Real-time video transmission are of great practical value of collected information for the original video coding, video streaming access to their own code is to achieve real-time video transmission and the key QoS.)
    2009-08-01 11:04:37下载
    积分:1
  • cal-diameter
    计算网络静态参数的直径c程序(其中的数据是具体的可换成其他的数据)。(computing network diameter of the static parameters c (which is specific data can be replaced by other data).)
    2007-01-02 14:49:19下载
    积分:1
  • 最佳工作序列
    说明:  有N件工作,输入每件工作的费时、最后完成的期限及工作的价值,试求可能的一个完成工作序列,使价值和最大(There are N pieces of work, input each piece of work time, deadline and the value of the work, try to find a possible completion of the work sequence, so that the value and maximum)
    2019-04-02 14:06:36下载
    积分:1
  • tf-idf一种计算方法
    tf-idf一种计算方法
    2014-07-02下载
    积分:1
  • LoginQQ
    VC++自动登陆QQ的代码,VS2010的编译环境(The automatic landing VC++ QQ code, VS2010 the compiler environment)
    2013-04-26 17:14:24下载
    积分:1
  • getpclist
    Visual C#得到局域网计算机列表,也就是获取局域网内的所有在线的主机名称列表,请确保您的电脑在网络中,要不然程序获取时候可能要假死,需要强制结束任务。(Visual C# to get a LAN computer list, which is to obtain a list of all the online host names within the LAN, make sure your computer is on the network, or else the program when you may want to get suspended animation, you need to force the end of the task.)
    2014-09-12 08:56:36下载
    积分:1
  • 696518资源总数
  • 106161会员总数
  • 5今日下载