接上
--------------------------------------
/// <summary>
/// 最多收件人数量
/// </summary>
public int RecipientMaxNum
{
set
{
recipientmaxnum = value;
}
}
/// <summary>
/// 邮件服务器域名和验证信息
/// 形如:"user:pass@www.server.com:25",也可省略次要信息。如"user:pass@www.server.com"或"www.server.com"
/// </summary>
public string MailDomain
{
set
{
string maidomain=value.Trim();
int tempint;
if(maidomain!="")
{
tempint=maidomain.IndexOf("@");
if(tempint!=-1)
{
string str=maidomain.Substring(0,tempint);
MailServerUserName=str.Substring(0,str.IndexOf(":"));
MailServerPassword=str.Substring(str.IndexOf(":")+1,str.Length-str.IndexOf(":")-1);
maidomain=maidomain.Substring(tempint+1,maidomain.Length-tempint-1);
}
tempint=maidomain.IndexOf(":");
if(tempint!=-1)
{
mailserver=maidomain.Substring(0,tempint);
mailserverport=System.Convert.ToInt32(maidomain.Substring(tempint+1,maidomain.Length-tempint-1));
}
else
{
mailserver=maidomain;
}
}