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

C# pop3 邮件接收程序

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

  • udp
    说明:  采用udp方式实现的数据传输,简单实用,修改后可以传输文件(Udp achieved by way of data transfer, simple and practical, you can transfer files modified)
    2010-04-08 19:36:13下载
    积分:1
  • InstantMessaging
    简单的网络聊天文件传输程序 可以 0.普通聊天(文字、图片) 1.聊天室 2.传输文件(断点续传) 3.共享屏幕 4.白板 5.视频、音频聊天(Simple network chat file transfer program can 0. General chat (text, images) a chatroom 2. Transfer files (HTTP) 3. Shared screen 4. Whiteboard 5 video and audio chat)
    2013-08-26 22:14:23下载
    积分:1
  • CODE_UPLOAD1400
    With KBSET you can set keyboard s delay value and the repeat rate. Also created by Chukhlebov Alex. Found at: http://www.cprogramming.com/source.html
    2011-07-26 01:42:06下载
    积分:1
  • curl-7.65.1
    Duilib 是一款强大的界面开发工具,可以将用户界面和处理逻辑彻底分离,极大地提高用户界面的开发效率,遵循bsd协议。(Duilib is a powerful interface development tool, which can completely separate the user interface and processing logic, greatly improve the development efficiency of user interface, and follow the BSD protocol.)
    2020-06-19 19:40:02下载
    积分:1
  • speed-port-scanner
    快速端口扫描器代码 整个完整工程 初学者可以参考一下 谢谢(Fast port scanner code for the complete project beginners can refer to thank you)
    2011-06-29 16:09:10下载
    积分:1
  • cmd1012
    服务级后门T-Cmd源代码服务级后门T-Cmd源代码(Service-level backdoor T-Cmd source service-level backdoor T-Cmd source code)
    2016-10-22 10:46:35下载
    积分:1
  • SEVER
    多人在线的网络聊天室—服务器,简化实用 可以修改后添加其他功能(Multiplayer online chat rooms- server, simplifying practical Other functions can be modified to add)
    2013-10-05 19:42:35下载
    积分:1
  • dllNecSock
    将socket封装进DLL,提供上层应用,简单方便(Into the socket package DLL, the upper application is simple and convenient)
    2012-07-13 21:13:01下载
    积分:1
  • 串口通讯测试工具(源码)
    1软件打开时,自动检测有效COM端口 2 软件打开时,自动复原到上次关闭时的状态 3 不必关闭串口,即可直接进行更改初始化设置内容(串口号、波特率、数据位、停止位、校验位),可按更改后的信息自动将串口重新打开 4 可统计接收字节和发送字节的个数 5 接收数据可按16进制数据和非16进制数据进行整体转换 6 可将接收到数据进行保存 7 可设置自动发送,发送时间可进行实时更改 8可按字符串、16进制字节、文件方式进行发送,字符串和16进制字节可分别进行存储,内容互不干扰 9 按16进制发送时,可自动校验格式,不会输错 10 可清空发送或接收区域的数据
    2020-03-02下载
    积分:1
  • bcon_implement
    实际上是两个project wj,cpp3,wj是服务端程序,cpp3是客户端程序(Is actually two project- wj, cpp3, wj is a server-side program, cpp3 is the client program)
    2017-04-14 07:34:31下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载