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 |
What is validation in asp.net?
Why mvc is better than asp.net? : Asp.Net MVC
What is smpte vc-1?
What is inheritance and an how it be used, example with an example?
what is command line compiler.what are the steps and how it is related to debugging.
Suppose there is one web farm with 3 servers inside with same configuration and the same project is running inside all servers.Which session mode is usde for all these and why?
How Clustered Index and Non clustered index stored on SQL server?
Given an ASP.NET Web Form called WebFrom1, what class does the WebForm1 class inherit from by default? a) System.Web.Form b) System.Web.GUI.Page c) System.Web.UI.Page d) System.Web.UI.Form
How do you design a website with multilingual support in ASP.NET ?
What is X-Path?
What is boxing?
8 Answers IBM, Misys, Siebel Systems,
What are Http handler ?