接上
------------------------
//构造函数
public ESmtpMail()
{
Attachments = new System.Collections.ArrayList();
}
//-----------------过程
/// <summary>
/// 添加邮件附件
/// </summary>
/// <param name="path">附件绝对路径</param>
public void AddAttachment(string path)
{
Attachments.Add(path);
}
/// <summary>
/// 添加一个收件人
/// </summary>
/// <param name="str">收件人地址</param>
public bool AddRecipient(string str)
{
str=str.Trim();
if(str==null||str==""||str.IndexOf("@")==-1)
return true;
if(RecipientNum<recipientmaxnum)
{
Recipient.Add(RecipientNum,str);
RecipientNum++;
return true;
}
else
{
errmsg+="收件人过多";
return false;
}
}
/// <summary>
/// 添加一组收件人(不超过recipientmaxnum个),参数为字符串数组
/// </summary>
/// <param name="str">保存有收件人地址的字符串数组(不超过recipientmaxnum个)</param>
public bool AddRecipient(string[] str)
{
for(int i=0;i<str.Length;i++)
{