Guest User

Untitled

a guest
Jan 19th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. public ActionResult ConfirmarOrden()
  2. {
  3. MailMessage mail = new MailMessage();
  4. SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
  5. mail.From = new MailAddress("MICORREO@gmail.com");
  6. mail.To.Add("CORREODELCLIENTE@gmail.com");
  7. mail.Subject = "Nueva orden";
  8. mail.Body =
  9. "<table border striped><thead><tr><td>Preview</td><td>Name a Door</td><td>Outside profile</td><td>Inside profile</td><td>Flat Panel</td><td>Quantity</td><td>Sub-Total</td><td>Total Price</td></tr></thead><tbody><tr><td><img src=@i.Picture></td><td>@i.Material.Description</td><td>@i.OutsideEdgeProfile.Description</td><td>@i.InsideEdgeProfile.Description</td><td>@i.PanelMaterial.Description</td><td>@i.Quantity</td></tr></tbody></table>";
  10. mail.IsBodyHtml = true;
  11.  
  12. SmtpServer.Port = 800;
  13. SmtpServer.Credentials = new System.Net.NetworkCredential("MICORREO@gmail.com", "CLAVEDEMICORREO");
  14. SmtpServer.EnableSsl = true;
  15. SmtpServer.Send(mail);
  16. return Json(true, JsonRequestBehavior.AllowGet);
  17. }
Add Comment
Please, Sign In to add comment