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

Difference between singleton and singlecall.

924


Explain what is an abstract class?

971


What is the concept of view state in asp.net?

978


What is synchronous and Asynchronous post back ?

1066


What is dynamic web page with example?

911


What is the difference between stored procedure vs function?

984


What is simple data binding?

922


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

973


What is application variable?

891


Which .NET framework supports Web API?

1009


Describe SOA and the tenets of it?

996


What is data reader in asp.net?

1051


Where you store Connection string in "Web.Config" file in ASP.NET?

1004


How can you handle errors in Web API?

1051


Explain the differences between clr & cts?

952