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

Types of store procedure in Sqlserver?

3 Answers  


If you want to bind the columns manually within the asp:datagrid tags what kind of tags you have to add.

0 Answers   Siebel,


What are the ways of preserving data on a Web Form in ASP.NET?

0 Answers  


How does asp page work?

0 Answers  


What are the main advantages of using asp.net?

0 Answers  


5. What three Specific Job Positions do you target from Swatz Oils GROUP U.K?

0 Answers   Swatz Oils,


Explain asp.net web forms.

0 Answers  


what are the main advantage in .net?

4 Answers   TCS,


How can I have a particular web page in an asp.net application which displays its own error page?

0 Answers  


RequiredFieldValidator--write code in javascript

3 Answers   Wipro,


what is shared assembly asp net

1 Answers   Fidelity,


If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?

7 Answers   Syntax Softtech,


Categories