⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eidfe.cs

📁 A project written in C# sends email without smtp server. It queries dns server for mx records and se
💻 CS
字号:
// $Id: EIDFE.cs,v 1.4 2006/08/07 10:57:09 ethem Exp $
namespace Erle.DnsMail
{
	using System;
	using System.Collections;

	#region Enums
	public enum ContentType
	{
		Text = 0,
		Html
	}
	#endregion

	#region Interfaces

	public interface IRecipient
	{
		String Subject { get; set; }
		String[] BodyParams { get; set; }
	}

	public interface ISendableOneByOne
	{
		event SentByOneStatusHandler SentByOneStatus;
		void SendOneByOne(String formattedBody);
	}

	#endregion

	#region Delegates

	public delegate void HostResolvedHandler(String host, ICollection mx);
	public delegate void ConnectedHandler(String connectedIP);
	public delegate void RecipientsAddedHandler(RecipientCollection recipients);
	public delegate void ReadyToSendMassMailHandler(MailInfo mailInfo);
	public delegate void ProgressHandler(Int32 bytesSent, Int32 bytesRemaining);
	public delegate void ClosedHandler(String logs);
	public delegate void SentByOneStatusHandler(SentByOneStatusEventArgs e);

	#endregion

	#region EventArgs

	public class SentByOneStatusEventArgs : EventArgs
	{
		private readonly Recipient recipient;
		private readonly bool sent;

		public SentByOneStatusEventArgs(Recipient recipient, bool sent)
		{
			this.recipient = recipient;
			this.sent = sent;
		}

		public bool Sent
		{
			get { return sent; }
		}

		public Recipient Recipient
		{
			get { return recipient; }
		}
	}

	#endregion

	#region Exceptions

	public class EmailException : Exception
	{
		public EmailException(String s) : base(s) { }
	}

	public class DnsException : Exception
	{
		public DnsException(String s) : base(s) { }
	}

	public class MailServerException : Exception
	{
		public MailServerException(String s) : base(s) { }
	}

	#endregion
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -