The ASP.NET developers can use the Webmail class to send email in ASP.NET MVC Application.
Below is a code sample to demonstrate sending email in ASP.NET MVC Razor View.
How to send email in ASP.NET MVC Web Application ?
WebMail.SmtpServer = "<Smtp Server Name>"; WebMail.SmtpPort = "<Port Number>"; WebMail.EnableSsl = true; WebMail.UserName = "<smtp server username>"; WebMail.Password = "<smtp password>"; WebMail.From = "<From Email address>"; WebMail.Send("<To Email Address>", "Mail from AbundantCode","<email body");
Leave a Reply