Esempio n. 1
0
        protected void MailViewer1_OnRequireAction(object sender, MailActionEventArgs e)
        {
            switch (e.Action)
            {
            case MailActions.ACQUIRE:
                throw new NotImplementedException();

            case MailActions.REPLY_ALL:
                throw new NotImplementedException();

            case MailActions.FORWARD:
            case MailActions.REPLY_TO:
            case MailActions.RE_SEND:
                ucSendMail.Visible = true;
                if (WebMailClientManager.AccountIsValid())
                {
                    ucSendMail.LoginVisibile(false);
                }
                ucSendMail.Initialize(e.Action);
                break;

            case MailActions.SEND:
                ucSendMail.Visible = true;
                if (WebMailClientManager.AccountIsValid())
                {
                    ucSendMail.LoginVisibile(false);
                }
                ucSendMail.Initialize(MailActions.SEND, false);
                break;
            }
        }
Esempio n. 2
0
 protected void MailViewer1_OnRequireAction(object sender, MailActionEventArgs action, string parentFolder)
 {
 }
Esempio n. 3
0
        // 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();
            }
        }