Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (var smtp = new SmtpClient())
- {
- var credential = new NetworkCredential
- {
- UserName = "mysite@example.com",
- Password = "password"
- };
- smtp.Credentials = credential;
- smtp.Host = "smtp.gmail.com";
- smtp.Port = 465;
- smtp.EnableSsl = true;
- await smtp.SendMailAsync(message);
- await smtp.SendMailAsync(CustomerMsg);
- return RedirectToAction("Sent");
- }
- }
- return View(model);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement