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 |
Can session variables be accessed from code-behind?
Which methods validate all the controls on a page?
Suppose you want an asp.net function (client side) executed on the mouseover event of a button. Where do you add an event handler?
What is the purpose of App_Code folder in ASP.NET? Why we this?
0 Answers Sans Pareil IT Services,
What is the concepts of globalization and localization in .net?
Define cookie.
You need to retrieve data from a Microsoft SQL Server 2000. Currently you are using an oleDbConnection object to connect to the database server. You need to be able to retrieve the data from the database server in XML format. Which approach would be the most efficient? Select all that apply. Each answer constitutes part of the whole answer. a) Change to the SQL .NET provider. b) Use the ExecuteXmlReader() method of the xxxCommand object c) Use the DOM to create the XML document. d) Use the XmlDocument.Load() method to create the XML Document.
What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
What does assemblyinfo.cs file consist of?
What is Web Application?
how to integrate Language conversion, without asking the enduser to download font, it should auto integrate
With example & diagram explain AutoPostBack.