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

C# pop3 邮件接收程序

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

  • NET_Source
    c# socket 服务端异步通信,高并发,多线程(Socket c# server asynchronous communication, high concurrency, multi thread)
    2015-10-24 11:05:50下载
    积分:1
  • ask_answer
    该程序模拟知乎,作为网上问答系统,用户能注册,登录,提问,回答,点赞,关注,取关,查找问题,等一系列操作,一个服务器端可以同时连接多个客户端,能够同步各个客户端操作结果。程序分为客户端和服务器端,用户gui采用mfc编写,通信方式为socket方式,开发环境为win7 vs2015,编译器v140.(The program simulates know almost as online quiz system, users can register, login, questions, answers, thumbs up, focus on, take off, find the problem, and a series of operations, a server can be connected to multiple clients simultaneously, it is possible to synchronize each client operating results. Program is divided into client and server side, the user using mfc gui written communication for the socket, the development environment for win7 vs2015, compiler v140.)
    2016-05-17 11:56:13下载
    积分:1
  • huoqu
    获取本地计算机信息的小代码,比较简单,适合初学网络编程(a simple program of geting information from computer)
    2013-11-28 23:56:56下载
    积分:1
  • RemoteControl
    远程桌面控制的完整实现源码,设计文件在http://blog.csdn.net/dijkstar/article/details/9076911有详细描述,里面整合了位图压缩、鼠标键盘低级钩子等。里面的每项技术都具有工程参考价值。(Complete implementation of the remote control code, design documents described in detail in http://blog.csdn.net/dijkstar/article/details/9076911, which integrates bitmap compression, low-level mouse and keyboard hooks and so on. Inside each technology with engineering reference value.)
    2020-11-02 14:29:53下载
    积分:1
  • UDPinstance
    一个VC++写的基于UDP的通信程序实例(VC++ to write a UDP-based communication program example)
    2010-05-13 13:32:53下载
    积分:1
  • FANDISK
    典型的点云数据fandisk,适合点云研究者进行仿真,六千多个点(Typical fandisk point cloud data, suitable for researchers point cloud simulation, more than six thousand points)
    2014-12-22 19:31:17下载
    积分:1
  • page63.18运用C#写Pop3组件
    运用C#编写Pop3组件(use C# disk components)
    2004-10-22 16:54:24下载
    积分:1
  • huoqu
    说明:  获取本地计算机信息的小代码,比较简单,适合初学网络编程(a simple program of geting information from computer)
    2013-11-28 23:56:56下载
    积分:1
  • modbus TCPIP协议client-Server端源代码
    利用vc++实现modbus tcp通信(Using vc++ to implement Modbus TCP communication)
    2018-02-24 17:45:27下载
    积分:1
  • C++hao-zi-liao
    大家共享好东西, 尤其是学C++的出血者(share good things, especially learning C bleeding)
    2006-10-30 18:29:27下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载