public ActionResult MailDetails(string mailId)
 {
     try
     {
         if (!string.IsNullOrEmpty(mailId))
         {
             MailRepository mailRepository = Session["MailRepository"] as MailRepository;
             return(View(mailRepository.GetMessage(mailId, SpecialFolder.All)));
         }
         else
         {
             return(View("null"));
         }
     }
     catch (Exception)
     {
         return(View("null"));
     }
 }
        public ActionResult MailModifyAdvanced(string uniqueId, SpecialFolder specialFolder)
        {
            MailRepository  mailRepository = Session["MailRepository"] as MailRepository;
            IMessageSummary getMessageInfo = mailRepository.GetMessageInfo(uniqueId, specialFolder);

            ViewBag.getMessageInfo = getMessageInfo;

            if (!getMessageInfo.Flags.Value.HasFlag(MessageFlags.Seen))
            {
                MailAddFlags(uniqueId, MessageFlags.Seen);
            }

            return(View("~/Views/ControlPanel/MailAdvanced/MailModifyAdvanced.cshtml", mailRepository.GetMessage(uniqueId, specialFolder)));
        }