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

C# pop3 邮件接收程序

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

  • 图象压缩与传输
    这个源码涉及到网络编程,图像处理,数据压缩与传输。(source involved in the programming of the network, image processing, data compression and transmission.)
    2005-07-06 14:52:04下载
    积分:1
  • pop3 接收邮件
    pop3 接收邮件,ssl加密也可以用
    2014-06-05下载
    积分:1
  • mailnotify
    Mail Notify sample with source
    2010-09-21 21:40:10下载
    积分:1
  • YCArray
    说明:  /** * 动态数组的模板类 * 1.支持字符索引 * 2.方便的添加删除修改任意一项 * 最后更新 2004-8-9 yzh **1.优化了字符索引的运作方式,使用数组存储 **2.重写了底层数据的存储,将连续性的存储方式改为了非连续, *** 从而很好有效地支持了“引用”,并且让数据的删除增加变的更为快速 * 用法如: * YCArray<int,int> test * test.Add("Number2",4) * test.Add("Number1",2) * printf("%d %d",test["Number1"],test["Number2"]) * 显示: * 2 4 ******* ******* History: 2004-11-19 修改了析构函数,解决了索引没有释放的bug **/(/*** dynamic array template class* 1. Support characters Index* 2. Add convenience to delete arbitrary* a final update 2004-8-9 yzh** 1. Character Index optimized mode of operation, the use of storage arrays** 2 . a rewrite of the underlying data storage, storage continuity conversion of non-continuous, and thus good*** effective support to the "quote", and let the data changed to delete the more rapid* usage such as :* YCArraylt; int, intgt; test* test. Add ( "Number2", 4)* test.Add ( "Number1", 2)* printf ( "% d% d", test [ "Number1"] test [ "Number2"])* Display :** 2 4************* History : 2004-11-19 revised the destructors, the index did not address the release of bug** /)
    2005-09-06 13:03:51下载
    积分:1
  • TCPaUDP
    一段TCP和UDP通讯的程序,包含了服务器端和客户端的代码。(Some TCP and UDP communication procedures, including server and client code.)
    2014-07-21 08:28:29下载
    积分:1
  • vs做的局域Ping和消息发送
    vs做的局域网Ping和消息发送程序.rar(vs Ping LAN messaging and procedures. Rar)
    2004-12-24 08:49:57下载
    积分:1
  • sxesuvy
    用VC开发的C语言编写的MD5程序源码,作为开发md5的参考(The source code of MD5 program written in C language developed by VC is a reference for developing md5.)
    2018-12-31 16:12:09下载
    积分:1
  • udp数据包转发
    说明:  基于WinSock的UDP数据转发(Win XP;Visual C++ 6.0)(WinSock based on the UDP data transmitted (Win XP; Visual C 6.0))
    2006-02-17 10:11:31下载
    积分:1
  • vncviewer
    说明:  这是一个比较复杂的远程控制工具,分为服务器与客户斋,让你了解socket编程的知识.(This is a more complex remote control tools, is divided into server and client fasting, so that you understand socket programming knowledge.)
    2008-11-17 16:42:34下载
    积分:1
  • Test
    网络编程大作业,一个网页的点名系统,包含客户端和服务器,界面不错,有部分CSS类容。(Network programming large operations, a page named systems, including client and server interface well, some CSS class content.)
    2016-06-03 10:39:17下载
    积分:1
  • 696518资源总数
  • 106253会员总数
  • 14今日下载