public ActionResult SMTP(UpdateSmtpViewModel model)
 {
     if (ModelState.IsValid)
     {
         HttpContent form = new FormUrlEncodedContent(new[] {
             new KeyValuePair <string, string>("SmtpAdress", model.SmtpAdress),
             new KeyValuePair <string, string>("SmtpPort", model.SmtpPort.ToString()),
             new KeyValuePair <string, string>("SmtpUsername", model.SmtpUsername),
             new KeyValuePair <string, string>("SmtpPassword", model.SmtpPassword)
         });
         var res = ApiAnalista.EmailTrocaSMTP(form);
         if (res.IsSuccessStatusCode)
         {
             Session.Add("trocaSMTP", model);
             return(View(model));
         }
         else
         {
             var result = res.Content.ReadAsStringAsync().Result;
             ModelState.AddModelError("error", result);
             return(View(model));
         }
     }
     else
     {
         return(View(model));
     }
 }