• 大小: 2.94MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-19
  • 语言: C#
  • 标签: C#  ASP.NET  SQLDBA  源码  

资源简介

C# 实现利用pop3收发邮件,并可下载附件等 功能强大有源码 京华志&精华志出品 希望大家互相学习,互相进步 支持CSDN 支持微软 主要包括C# ASP.NET SQLDBA 源码 毕业设计 开题报告 答辩PPT等

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Threading;
using OpenPOP.POP3;
using OpenPOP;



namespace MailClient
{
    public partial class Form1 : Form
    {
        private POPClient popClient = new POPClient();
        private Hashtable msgs = new Hashtable();

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            txtMessage.Text = ““;
            msgs.Clear();
            listMessages.Nodes.Clear();//邮件列表
            listAttachments.Nodes.Clear();//附件列表
            popClient.AuthenticationBegan += new EventHandler(popClient_AuthenticationBegan);
            popClient.Authenticationfinished += new EventHandler(popClient_Authenticationfinished);
            popClient.CommunicationBegan += new EventHandler(popClient_CommunicationBegan);
            popClient.CommunicationOccured += new EventHandler(popClient_CommunicationOccured);
            popClient.CommunicationLost += new EventHandler(popClient_CommunicationLost);
            popClient.MessageTransferBegan += new EventHandler(popClient_MessageTransferBegan);
            popClient.MessageTransferFinished += new EventHandler(popClient_MessageTransferFinished);

        }
        #region 通讯事件
        private void popClient_CommunicationBegan(object sender EventArgs e)
        {
            AddEvent(“开始连接POP3服务器“);
        }

        private void popClient_CommunicationOccured(object sender EventArgs e)
        {
            AddEvent(“连接成功!“);
        }

        private void popClient_AuthenticationBegan(object sender EventArgs e)
        {
            AddEvent(“经行用户验证“);
        }

        private void popClient_Authenticationfinished(object sender EventArgs e)
        {
            AddEvent(“验证成功!“);
        }

        private void popClient_MessageTransferBegan(object sender EventArgs e)
        {
            AddEvent(“开始经行邮件接收“);
        }

        private void popClient_MessageTransferFinished(object sender EventArgs e)
        {
            AddEvent(“邮件接收完毕!“);
        }

        private void popClient_CommunicationLost(object sender EventArgs e)
        {
            AddEvent(“关闭连接!“);
        }
        #endregion

        /// 
        /// 接收邮件,直接收邮件头
        /// 陈明新
        /// 

        private void ReceiveMails()
        {
            popClient.Disconnect();
            popClient.Connect(txtPOPServer.Text int.Parse(txtPort.Text));
            popClient.Authenticate(txtLogin.Text txtPassword.Text);

            int Count = popClient.GetMessageCount();//读取邮件总数

            txtTotalMessages.Text = Count.ToString();

            txtMessage.Text = ““;
            msgs.Clear();
            listMessages.Nodes.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      59136  2012-06-25 22:53  C# pop3实现邮件 可下载附件\PopMail\2000多商业程序 OA 程序下载 版权说明.txt

     文件    3543552  2012-06-22 02:06  C# pop3实现邮件 可下载附件\PopMail\DevComponents.DotNetBar2.dll

     文件     184655  2011-11-01 15:01  C# pop3实现邮件 可下载附件\PopMail\MailClient\20110223 基金经理每周视点(20110215)利率市场化离我们还有多远.pdf

     文件     200701  2011-11-01 15:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\a_b _ c.pdf

     文件      10830  2009-06-17 17:43  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Form1.cs

     文件      17288  2009-06-17 17:43  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Form1.Designer.cs

     文件       6217  2009-06-17 17:43  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Form1.resx

     文件       3629  2009-06-17 16:44  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\MailClient.csproj

     文件        469  2009-06-17 16:23  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Program.cs

     文件       1168  2009-06-17 16:23  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Properties\AssemblyInfo.cs

     文件       2874  2009-06-17 16:23  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Properties\Resources.Designer.cs

     文件       5612  2009-06-17 16:23  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Properties\Resources.resx

     文件       1093  2009-06-17 16:23  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Properties\Settings.Designer.cs

     文件        249  2009-06-17 16:23  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient\Properties\Settings.settings

     文件       1884  2009-06-17 16:40  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient.sln

    ..A..H.     36864  2011-10-18 15:03  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MailClient.suo

     文件       1770  2004-06-16 19:42  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\AssemblyInfo.cs

     文件      14929  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\Attachment.cs

     文件       1420  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\Common.cs

     文件       5290  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\DecodeQP.cs

     文件       1261  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\Exceptions.cs

     文件      39265  2004-06-16 18:59  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\Message.cs

     文件      17303  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\MIMETypes.cs

     文件       3798  2004-06-02 09:17  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\QuotedCoding.cs

     文件       2554  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\TNEFAttachment.cs

     文件      12989  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\TNEFParser.cs

     文件      18699  2004-06-16 14:00  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIME\Utility.cs

     文件       4378  2006-09-28 17:15  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIMEParser.csproj

     文件       2081  2006-09-28 17:15  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\MIMEParser\MIMEParser.csproj.user

     文件       1695  2004-06-16 19:41  C# pop3实现邮件 可下载附件\PopMail\MailClient\Backup\OpenPOP\AssemblyInfo.cs

............此处省略146个文件信息

评论

共有 条评论