C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






How to send an email in asp.net


Posted Date: 04 Sep 2008    Resource Type: Code Snippets    Category: C# Syntax

Posted By: Nitin Kumar Sharma       Member Level: Silver
Rating:     Points: 10







How to send a email using ASP.NET



We need to import the 'System.Web.Mail' namespace and use SMTP(Simple mail transfer protocol) component for the same.Below is the code snippet for the same.
 

//create the mail message



MailMessage objEmail = new MailMessage();

objEmail.To = "niks@yahoo.com";

objEmail.From = "admin@yahoo.com";

objEmail.Cc = "shiv@yahoo.com";

objEmail.Subject = "Test Email";

objEmail.Body = "Hi This is test email";



//finally send the email



SmtpMail.Send(objEmail);



For more details, visit http://kaniks.blog.co.in/2008/09/02/how-to-send-email-in-aspnethow-to-send-email-in-aspnet/




Responses

Author: UltimateRengan    05 Sep 2008Member Level: Diamond   Points : 1
hi
http://kaniks.blog.co.in/2008/09/02/how-to-send-email-in-aspnethow-to-send-email-in-aspnet/
this link not show the contents of "How to send a email using ASP.NET"


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sending email from asp.net page  .  Sending email  .  Send email  .  How to send an email in asp.net  .  ASP.NET  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: how to pass two values from one page during another page with help of query string
Previous Resource: Kill Running Process
Return to Discussion Resource Index
Post New Resource
Category: C# Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use