.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Email >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Sending Email Through ASP.NET

Posted By:shubhang       Posted Date: April 30, 2010    Points: 10    Category: Email    URL: http://www.dotnetspark.com  

Sending Email using ASP.NET with c#
 

using System.Web.Mail;

    public void semdMail()
    {
            MailMessage mail = new MailMessage();

            mail.To = "Receiver EMail ID";

            mail.From = "Sender Name";

            mail.Subject = "Subject";

            mail.Body = "Message";


            SmtpMail.SmtpServer = "localhost";

            SmtpMail.Send(mail);
    }

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend