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 do I send e-mail from an ASP.NET application ?



How do I send e-mail from an ASP.NET application ?..

Answer / kumar saurabh

MailMessage message = new MailMessage ();
message.From = <email>;
message.To = <email>;
message.Subject = "Scheduled Power Outage";
message.Body = "Our servers will be down tonight.";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send (message);
MailMessage and SmtpMail are classes defined in the .NET Framework Class Library's System.Web.Mail namespace. Due to a security change made to ASP.NET just before it shipped, you need to set SmtpMail's SmtpServer property to "localhost" even though "localhost" is the default. In addition, you must use the IIS configuration applet to enable localhost (127.0.0.1) to relay messages through the local SMTP service.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

I need some questions regarding asp.net for 1.5yrs of Experience.

1 Answers  


in database table is thier . in that table fields are photoid , photoname,photo... i want display image in the gridview

5 Answers   TCS,


What is the biggest disadvantage of “Other Return Types” in Web API?

0 Answers  


Explain the differences between Server-side and Client-side code?

12 Answers   Cognizant, CTS, Siebel Systems, Visual Soft,


I have got less marks in bsc it So how to get interview.tell me

1 Answers  


what is wpf and wcf in .net explain with an example?

2 Answers  


Is asp.net outdated?

0 Answers  


How can you pass multiple complex types in Web API?

0 Answers  


what are the State management and Its Uses

2 Answers  


Is it possible to prevent a browser from caching an ASPX page?

3 Answers  


How do you trap errors in ASP and how do you invoke a component in ASP ?

1 Answers   Cognizant,


How do you create a master page?

0 Answers  


Categories