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

What is the difference between ldap and active directory?

1086


How can you implement encapsulation in asp.net?

13073


hi .net gurus. plz if any one has dumps on 70-631 and 70-541 on windows sharepoint services kindly mail me.

1655


If there are multiple update panels on the page say upd1 and upd2. There is a button placed in upd1. How can you stop upd2 to update when button placed in upd1 is clicked?

981


Can you dynamically assign a Master Page?

998


How would ASP and ASP.NET applications run at the same time on the same server?

2511


How would you get asp.net running in apache web servers? Explain it's limitations.

988


Which object wraps the state or data of a user?

1001


When you are running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?

1067


Explain automatic memory management in .net.

1029


What is the difference between CLICK and MOUSE DOWN Event ?

1177


Why do we use datasource in asp.net?

981


Write a code snippet to implement the indentation in json in web api.

1067


What is state management react?

1038


Can I recieve both html markup for page and code in the asp.net web page's source code portion in the web browser?

934