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

C# pop3 邮件接收程序

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

  • 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
  • mymailcode
    本程序主要进行了发邮件的编写 已经调试通过了 可以进行发邮件的处理(the main procedures for the preparation of the mail has been testing can be conducted through the mail processing)
    2007-03-22 10:17:52下载
    积分:1
  • 仿QQ
    通过skin.dll来仿照QQ界面
    2014-02-17下载
    积分:1
  • TCP
    一个简单的TCP聊天程序,使用winsock api实现。(A simple TCP chat program)
    2010-03-14 14:26:44下载
    积分:1
  • HPSocket.Net-develop
    说明:  C# 版socket 收发 TCP协议 有模版样例(Csharp socket sending and receiving TCP protocol Sample with template)
    2020-08-27 11:36:45下载
    积分:1
  • chart
    说明:  点对点的聊天工具,公司不让QQ,SKYPE,就动手写了个超小巧的聊天工具(Peer-to-peer chat tool company from QQ, SKYPE, on hand to write a super-compact chat tools)
    2008-10-06 21:39:06下载
    积分:1
  • intrusion-detection
    入侵检测系统,可以检测各种入侵行为,还可以检测出入侵者的信息如:源IP,端口号,入侵类型等。(Intrusion Detection)
    2013-10-03 22:44:19下载
    积分:1
  • TCP侧信道攻击,用于实现CVE-2016-5696的漏洞验证 mountain_goat-master
    TCP侧信道攻击,用于实现CVE-2016-5696的漏洞验证(off-path exploit used to do CVE-2016-5696 poc)
    2020-06-19 04:20:01下载
    积分:1
  • INNETER-IC
    网络重传选择协议,可以检查传输信息的正确性。通过接受方的校检,通知发送方重新发送。 ( Network retransmission protocol, you can check the correctness of the transmission of information. By accepting the prosecution s school to notify the sender to resend.)
    2015-10-14 09:19:13下载
    积分:1
  • recvfrom
    windows网络编程recvfrom源码实例(windows network programming source code examples recvfrom)
    2015-11-06 19:35:25下载
    积分:1
  • 696524资源总数
  • 103920会员总数
  • 65今日下载