/// <summary> /// 获取邮件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ReceiveBtn_Click(object sender, EventArgs e) { if (AdviceTypeID != null && AdviceTypeID != "") { AdviceType adviceType = AdviceTypeHelper.GetAdviceType(AdviceTypeID); //try //{ MailHelper mailHelper = AdviceHelper.GetMailHelper(adviceType); string typeName = typeof(AdviceHelper).ToString(); bool delete = false; if (DeleteEmailTextBox.Text == "1") { delete = true; } string stateText = adviceType.StateText; MailResult result = mailHelper.ReceiveMail("We7.CMS.Utils.dll", typeName, "HandleReceiveMail", delete, stateText); LoadAdvices(); string errorRoot = "<a href=\"/admin/Advice/AdviceProcessManage.aspx\" >反馈监控管理</a>"; string message = ""; if (result.Count > 0) { message = "您共获取到了" + result.Count + "封邮件"; } else { message = "Sorry,没有邮件可以获取..."; } if (result.Success > 0) { message += ",并成功受理了" + result.Success + "条反馈信息。"; } else if (result.Count > 0 && result.Success == 0) { message += ",有" + result.Count + "封回复邮件存在错误信息,不可直接对应回复到反馈信息,请到" + errorRoot + " <邮件回复>下进行处理。"; } Messages.ShowMessage(message); //} //catch (Exception ex) //{ // Messages.ShowMessage("系统繁忙,请稍后在试!错误信息:"+ex.Message); //} } else { Messages.ShowMessage("请先选择反馈模型后再获取回复邮件!"); } }