Wednesday, 27 March 2013

How to send email via system.web.mail class: ASP.Net

Dear All,

One can send email via simple System.Web.Mail class of ASP.Net. Below mentioned is sample code for the same:


<% @Page Language="C#" %>

<% @Import Namespace="System.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();

// Receiver's email address ...

msgMail.To = "Recipient Email Address";

// Sender's email address ...

msgMail.From = "Sender’s
...
Categories
Windows , Mail Server , Scripting

No comments:

Post a Comment