Advertisement
Guest User

Untitled

a guest
Apr 12th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. using (var smtp = new SmtpClient())
  2. {
  3. var credential = new NetworkCredential
  4. {
  5. UserName = "mysite@example.com",
  6. Password = "password"
  7. };
  8.  
  9. smtp.Credentials = credential;
  10. smtp.Host = "smtp.gmail.com";
  11. smtp.Port = 465;
  12. smtp.EnableSsl = true;
  13. await smtp.SendMailAsync(message);
  14. await smtp.SendMailAsync(CustomerMsg);
  15. return RedirectToAction("Sent");
  16. }
  17. }
  18.  
  19. return View(model);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement