Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to send mail in asp.net

Answer Posted / deep

MainMessage message = new MailMessage();
message.From = <email>;
message.To = <email>;
message.Subject= "Subject of the Message";
message.Body = "Body Text";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(message);

MailMessage & SmtpMail are classes defined in ASP.Net FCL (Framework Class Library). In addition to the above, you must use IIS configuration applet to enable localhost to relay messages through the SMTP service.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use ipostback?

967


What is an asp.net validator? And, mention its types.

989


What is http response header?

1079


What is Partial PostBack in ASP.NET?

998


How do I use response redirect?

954


how to elimainte the similar data from the different tables

2135


What is difference between or and orelse?

944


What are the differnt types of handler in ASP.NET?

950


What r the asp.net list controls and diff. Between them?

939


What is __ requestverificationtoken?

953


Is asp.net free?

977


What are the Types of objects in ASP

1058


What is work flow gen? how can it will work with .Net?

3004


From which base class all web forms are inherited?

940


What is the use of session in web application?

928