Answer Posted / 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 View All Answers
Define secured sockets layer.
What is distributed system in asp.net?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?
What is work flow gen? how can it will work with .Net?
Explain State management in asp.net
Describe briefly what is the role of IIS on an ASP.NET application? What does it for the same application?
What is the request flow used for asp.net mvc framework? : asp.net mvc
What are the differences between code behind and code inline?
What is meant by server side scripting?
How does the service stream content?
In the Repeater control which way you can edit?
What is the usie of activex control in .net?
Explain how is a property designated as read-only?
What are the layouts of ASP.NET Pages?
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks