//获取模板
string fileName = "E:\\MailSend\\MailSend\\MailSend\\MailTemplete\\MailSkyTypeTemplet.htm";
FileStream aFile;
try
{
aFile = new FileStream(fileName, FileMode.Open, FileAccess.Read);
}
catch
{
return;
}
StreamReader sr = new StreamReader(aFile, Encoding.UTF8);
string templet = sr.ReadToEnd();
sr.Close();
#endregion
#region get templet
//获取模板
string fileNamebox = "E:\\MailSend\\MailSend\\MailSend\\MailTemplete\\MessageBoxTemplet.htm";
//FileStream aFilebox;
try
{
aFile = new FileStream(fileNamebox, FileMode.Open, FileAccess.Read);
}
catch
{
return;
}
sr = new StreamReader(aFile, Encoding.UTF8);
string templetbox = sr.ReadToEnd();
sr.Close();
#endregion
string body = GetString(templet, "_beginHead", "_endFoot", "");
string bodybox = GetString(templetbox, "_beginHead", "_endFoot", "");