最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用c#写的smtp邮件发送类
时间:2022-07-02 11:12:16 编辑:袖梨 来源:一聚教程网
//**********************Created by Chen**************************
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Collections;
using System.Collections.Specialized;
using KSN.Exceptions;
using KSN.Validate;
namespace KSN.Web.Mail
{
///
/// 邮件内容
///
public class MailMessage
{
private string sender=null;
private StringCollection receivers=new StringCollection();
private string subject="";
private string xMailer="";
private StringCollection attachments=new StringCollection();
private MailEncodings mailEncoding=MailEncodings.GB2312;
private MailTypes mailType=MailTypes.Html;
private byte[] mailBody=null;
///
/// 获取或设置发件人
///
public string Sender
{
get{return this.sender;}
set{this.sender=value;}
}
///
/// 获取收件人地址集合
///
public StringCollection Receivers
{
get{return this.receivers;}
}
///
/// 获取或设置邮件主题
///
public string Subject
{
get{return this.subject;}
set{this.subject=value;}
}
///
/// 获取或设置邮件传送者
///
public string XMailer
{
get{return this.xMailer;}
set{this.xMailer=value;}
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Collections;
using System.Collections.Specialized;
using KSN.Exceptions;
using KSN.Validate;
namespace KSN.Web.Mail
{
///
/// 邮件内容
///
public class MailMessage
{
private string sender=null;
private StringCollection receivers=new StringCollection();
private string subject="";
private string xMailer="";
private StringCollection attachments=new StringCollection();
private MailEncodings mailEncoding=MailEncodings.GB2312;
private MailTypes mailType=MailTypes.Html;
private byte[] mailBody=null;
///
/// 获取或设置发件人
///
public string Sender
{
get{return this.sender;}
set{this.sender=value;}
}
///
/// 获取收件人地址集合
///
public StringCollection Receivers
{
get{return this.receivers;}
}
///
/// 获取或设置邮件主题
///
public string Subject
{
get{return this.subject;}
set{this.subject=value;}
}
///
/// 获取或设置邮件传送者
///
public string XMailer
{
get{return this.xMailer;}
set{this.xMailer=value;}
相关文章
- Dreamweaver怎么输入项目符号? dw项目符号的添加方法 07-12
- 燕云十六声瘦骨罗汉奇遇怎么过-瘦骨罗汉奇遇攻略 07-12
- Win11安装虚拟网卡怎么启用-图文步骤 07-12
- 使用PS结合LR制作出民国风格的复古人像照片教程 07-12
- 微信公众号怎么制作一个签到积分的功能 07-12
- 剑星尼尔DLC星之泪怎么收集 尼尔DLC星之泪位置一览 07-12