try
{
listmail = mailclass.MailSend(mailbody); // 返回已经发送的邮件ID列表(包括抄送和密抄)
// listattfile = AttUpload(mailbody.MailReceiverStr.ToString()); // 返回邮件附件数组
foreach (string mailID in listmail)
{ // 循环发送邮件附件
foreach (UDS.Components.MailAttachFile att in upattlist)
{ // 处理邮件附件的数据库操作部分 Random TempNameInt = new Random();
string NewDocDirName = TempNameInt.Next(100000000).ToString();
Directory.CreateDirectory(Server.MapPath(".") + "\\AttachFiles\\" + Username + "\\" + NewDocDirName);
File.Copy(Server.MapPath(".") + "\\" + att.FileVisualPath, Server.MapPath(".") + "\\AttachFiles\\" + Username + "\\" + NewDocDirName + "\\" + att.FileName, true); att.FileVisualPath = "\\AttachFiles\\" + Username + "\\" + NewDocDirName + "\\" + att.FileName;
mailclass.AttSend(att, Int32.Parse(mailID));
}
}
if (cblistAttribute.Items[1].Selected && Request.Form["hdnProjectID"].ToString() != "0")
{
DocProcess(mailbody, upattlist);
} Response.Write("<script language=javascript>alert('邮件发送成功!');if(parent.frames.length==0) window.close();else self.location=('Index.aspx');</script>");
}
catch (Exception sendex)
{
UDS.Components.Error.Log(sendex.ToString());
Server.Transfer("../../Error.aspx");
}文件“邮件.doc”正由另一进程使用,因此该进程无法访问该文件。"
{
listmail = mailclass.MailSend(mailbody); // 返回已经发送的邮件ID列表(包括抄送和密抄)
// listattfile = AttUpload(mailbody.MailReceiverStr.ToString()); // 返回邮件附件数组
foreach (string mailID in listmail)
{ // 循环发送邮件附件
foreach (UDS.Components.MailAttachFile att in upattlist)
{ // 处理邮件附件的数据库操作部分 Random TempNameInt = new Random();
string NewDocDirName = TempNameInt.Next(100000000).ToString();
Directory.CreateDirectory(Server.MapPath(".") + "\\AttachFiles\\" + Username + "\\" + NewDocDirName);
File.Copy(Server.MapPath(".") + "\\" + att.FileVisualPath, Server.MapPath(".") + "\\AttachFiles\\" + Username + "\\" + NewDocDirName + "\\" + att.FileName, true); att.FileVisualPath = "\\AttachFiles\\" + Username + "\\" + NewDocDirName + "\\" + att.FileName;
mailclass.AttSend(att, Int32.Parse(mailID));
}
}
if (cblistAttribute.Items[1].Selected && Request.Form["hdnProjectID"].ToString() != "0")
{
DocProcess(mailbody, upattlist);
} Response.Write("<script language=javascript>alert('邮件发送成功!');if(parent.frames.length==0) window.close();else self.location=('Index.aspx');</script>");
}
catch (Exception sendex)
{
UDS.Components.Error.Log(sendex.ToString());
Server.Transfer("../../Error.aspx");
}文件“邮件.doc”正由另一进程使用,因此该进程无法访问该文件。"
解决方案 »
- asp.net Web 应用程序如何访问指定用户的Profile信息,并对其进行读写操作?
- 文本框输出Session的值
- 依旧是数据更新问题,求高手求解决!
- asp.net sql server 做的網站在VS2008上運行正常,在IIS上運行得不到數據庫的資料只有頁面控件顯示
- .aspx删除次表关联的信息
- 在删除数据前,想弹出个对话框,怎么做
- 怎么传递含有空格得字符串??
- 问一个简单的问题
- 请问:asp.net 中,当鼠标移到datagrid一模板列中的表的一列上时,把这列的内容以替换方本显示,怎样做?
- 关于传值问题
- 这两个参数里面有什么object sender, GridViewRowEventArgs e
- 报表里XML 设了个<allowblank>true</allowblank>???
这个WORD文档正在使用发邮件完毕要释放资源。