private void AccountInvalidated() { WebMailClientManager.AccountRemove(); WebMailClientManager.CurrentFolderRemove(); WebMailClientManager.CurrentMailRemove(); Inbox1.Initialize(); pnlLogin.Update(); pnlMail.Update(); pnlNav.Update(); this.info.AddMessage("Account non più valido. Ripetere la selezione della casella di posta", Com.Delta.Messaging.MapperMessages.LivelloMessaggio.INFO); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ucSendMail_MessageInvalid(object sender, EventArgs e) { WebMailClientManager.CurrentMailRemove(); MailViewer1.Initialize(); (this.Page as BasePage).info.AddMessage("Mail non disponibile. Ripetere la scelta", Com.Delta.Messaging.MapperMessages.LivelloMessaggio.INFO); }
protected void MailResearch_Hide(object sender, EventArgs e) { WebMailClientManager.CurrentMailRemove(); MailViewer1.Initialize(null, null, null, null); pnlMail.Update(); }
// Testare bene todo modificare mailmove protected void MailViewer1_OnRequireAction(object sender, MailActionEventArgs action, string parentFolder) { switch (action.Action) { case MailActions.ACQUIRE: if (WebMailClientManager.CurrentMailExist() && WebMailClientManager.AccountIsValid()) { MailUser muser = WebMailClientManager.getAccount(); Message msg = WebMailClientManager.CurrentMailGet(); while (msg.Container != null) { msg = msg.Container; WebMailClientManager.CurrentMailRemove(); } if (!WebMailClientManager.CurrentMailExist()) { WebMailClientManager.CurrentMailSet(msg); } if (!String.IsNullOrEmpty(msg.HeaderFields["x-trasporto"]) && msg.HeaderFields["x-trasporto"].Equals("posta-certificata", StringComparison.InvariantCultureIgnoreCase)) { string uid = msg.Uid; int id = msg.Id; msg = msg.SubMessages[0]; msg.Uid = uid; msg.Id = id; } try { //TODO:ACQUISIOZNE MAIL INIT BEAKPONT - ALBERTO if (msg.Uid == null) { msg.Uid = MailViewer1.hfUIDMailValue; } //Richiesta req = FaxPec.ServiceContracts.ServiceLocator.GetServiceFactory().RichiestaService.ProcessMail(muser, msg, parentFolder); //if (req != null) //{ // List<string> uids = new List<string>(); // uids.Add(msg.Uid); // string utente = Com.Delta.Anag.Security.MySecurityProvider.CurrentPrincipalName; // ServiceLocator.GetServiceFactory().getMailServerFacade(muser).MailMove(uids, MailStatus.LETTA, "1", utente, parentFolder); // FaxPec.Caching.Session.SessionManager<Richiesta>.set(FaxPec.Caching.Session.SessionKeys.FAXPEC_RICHIESTA, req); //} } catch (ManagedException bex) { if (bex.GetType() != typeof(ManagedException)) { ManagedException mEx = new ManagedException(bex.Message, "ERR_G043", string.Empty, string.Empty, bex); ErrorLogInfo er = new ErrorLogInfo(mEx); log.Error(er); } ((BasePage)Page).info.AddMessage(bex, Com.Delta.Messaging.MapperMessages.LivelloMessaggio.ERROR); return; } // Response.Redirect("~/pages/Istruz/IstruzioneRichiesta.aspx?m=m"); } break; case MailActions.FORWARD: case MailActions.REPLY_TO: case MailActions.RE_SEND: ucSendMail.Visible = true; if (WebMailClientManager.AccountIsValid()) { ucSendMail.LoginVisibile(false); } ucSendMail.Initialize(action.Action); break; case MailActions.SEND: throw new NotImplementedException(); } }