您的位置: 首页 - mail
  • 本站大部分内容从网上收集,收集目的仅供研究、学习。涉及版权或不希望收录您的文章请您及时与我联系。
  • 本站IM群,请自行选择。请各位朋友按照自己喜好加入。加入群后请及时发言,防止被清理。谢谢您的合作!!!
  • QQ群:Y①WEB开发(ASP.NET)号码:7351660 QQ群:Y②WEB开发(ASP+.NET)号码:11864905
  • QQ群:Y③WEB开发(DIV+CSS)号码:16610506 QQ群:Y④WEB开发(JS+AJAX)号码:16143998
  • QQ群:Y⑤WEB开发(新手)号码:12777715 MSN群:yaosansi[at]126.com

c# 支持SMTP服务器认证的邮件发送类

分类: C#|DOTNET 发布: yaosansi 浏览: 日期: 2005年12月12日

using System;
using System.Text;
using System.IO;
using System.Net;
using System.Net.Sockets;

c#收取邮件

分类: C#|DOTNET 发布: yaosansi 浏览: 日期: 2005年10月31日

程序代码 程序代码
namespace POP3Client
{
 using System.IO ;
 using System.Net;
 using System.Net.Sockets ;
 //Please note that all code is copyright 2002 by William J Dean
 public class POP3client
 {
  public enum connect_state {disc,AUTHORIZATION,TRANSACTION,UPDATE};

  public string user;
  public string pwd;
  public string pop;
  public bool error;
  public connect_state state=connect_state.disc ;

  //borrowed from Agus Kurniawan's article:"Retrieve Mail From a POP3 Server Using C#" at http://www.codeproject.com/csharp/popapp.asp
  private TcpClient Server;
  private NetworkStream NetStrm;
  private StreamReader RdStrm;
  private string Data;
  private byte[] szData;
  private string CRLF = "\r\n"; 

  public POP3client()
  {
   //nothing to do..just create to object 
  }

  public POP3client(string pop_server,string user_name,string password)
  {
   //put the specied server (pop_server), user (user_name) and password (password)
   //into the appropriate properties.
   pop=pop_server;
   user=user_name;
   pwd=password;
  }

  #region Utility Methods, some public, some private
  public string connect (string pop_server)
  {
   pop=pop_server; //put the specified server into the pop property
   return(connect()); [co...
分页:[«]1[»]

Powered By Z-Blog 1.8 Walle Build 100427

UNISON UPDATE Copyright 2005-2010 yaosansi'site All Rights Reserved.
感谢系统大玩家为本站提供FTP空间
辽ICP备05021434号