Answer Posted / deep
MainMessage message = new MailMessage();
message.From = <email>;
message.To = <email>;
message.Subject= "Subject of the Message";
message.Body = "Body Text";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(message);
MailMessage & SmtpMail are classes defined in ASP.Net FCL (Framework Class Library). In addition to the above, you must use IIS configuration applet to enable localhost to relay messages through the SMTP service.
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Difference between singleton and singlecall.
Explain what is an abstract class?
What is the concept of view state in asp.net?
What is synchronous and Asynchronous post back ?
What is dynamic web page with example?
What is the difference between stored procedure vs function?
What is simple data binding?
What is an asp.net validator? And, mention its types.
What is application variable?
Which .NET framework supports Web API?
Describe SOA and the tenets of it?
What is data reader in asp.net?
Where you store Connection string in "Web.Config" file in ASP.NET?
How can you handle errors in Web API?
Explain the differences between clr & cts?