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

C# pop3 邮件接收程序

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

  • linux-version.tar
    计算机网络中的几个简单协议的仿真代码,从简单到复杂。。。比适合初学者(Computer network in a few simple agreement of simulation code, from simple to complex. . . Than suitable for beginners)
    2008-05-05 21:32:39下载
    积分:1
  • filetransserver
    务器端基于select I/O模型。为防止程序界面阻塞,有一个子线程用于不断接收socket并select其中的处理。客户端只有一个线程函数,不过其利用率很高,可用于远程目录交换,请求文件大小,创建若干线程来下载文件。文件传输有上传和下载,还有对等传输,这个项目中,传输文件具体指下载。 (side is based on the Treasury select I/O model. To prevent the program interface obstruction, a son threaded socket for receiving continuous and select which of treatment. Only one client thread function, but its high efficiency, long-distance directory can be used to exchange documents requested size, creating a number of threads to download files. Upload a file transfer and downloading, and the transmission of the project, specifically referring to transfer files downloaded.)
    2007-04-19 10:07:59下载
    积分:1
  • c# 高性能 iocp服务端 示例源码
    c# 高性能 iocp服务端 示例源码
    2017-12-28下载
    积分:1
  • WebQQ 接口 以及测试项目 附完整源码
    webqq接口实例,含测试项目
    2013-04-08下载
    积分:1
  • 图着色算法
    用于D2D用户分簇的图着色,很方便使用的一个程序(D2D user clustering for the graph coloring, it is convenient to use a program)
    2021-04-28 23:48:43下载
    积分:1
  • ava-kuangjia
    ava 框架,以前找的,不知道现在能用不,需要的自己下载(ava kuangjia )
    2013-12-21 21:33:50下载
    积分:1
  • httpclient
    说明:  输入参数:某个web地址,端口号(默认80)。 连接成功后,提示,输入:某个文件名。例如index.jsp 获取文件成功后,输出发送的字节数和接收到的字节数。关闭(Input parameters: a web address, port number (default 80). Connection is successful, prompt, type: a file name. For example, access to the file index.jsp is successful, the output number of bytes sent and received bytes. Close)
    2010-03-17 23:42:01下载
    积分:1
  • advancePing
    编写自己的一个ping程序,可以说是许多人迈出网络编程的第一步吧!!这个ping程序的源代码经过修改和调试,基本上可以取代windows中自带的ping程序.(preparation of a ping own procedures, It can be said is that many people take the first step to network programming! ! The ping program's source code has been modified and debugging, can basically replace the windows were bringing their ping procedures.)
    2007-04-12 22:14:20下载
    积分:1
  • Chat
    异步套接字编写的网络聊天室程序,根据孙鑫VC++深入详解的例子改写,使用Visual studio 2008 SP1在Unicode编码环境下编写,可以收发中文字符。(Asynchronous socket program written in Internet chat rooms, according to Sun Xin VC++ depth Detailed examples rewritten using Visual studio 2008 SP1 environment written in Unicode encoding, you can send and receive Chinese characters.)
    2013-11-28 14:44:55下载
    积分:1
  • C# UDP 文件传输实例源码
    C# UDP 文件传输实例源码
    2014-06-19下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载