how to send mail in asp.net

Answers were Sorted based on User's Feedback



how to send mail in asp.net..

Answer / 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

how to send mail in asp.net..

Answer / varma

by using we can send the mail using asp.net we can also
upload sir said in class i can't remember now

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is the benefit of WebAPI over WCF?

0 Answers  


what is DLL Hell and how it is solved in .NET?

24 Answers   icegen, next, -uk, NIIT,


What is query string?

0 Answers  


How does session authentication work?

0 Answers  


when is the role performed by IIS sever when ever a request send from browser

0 Answers  


What methods are fired during the page load?

3 Answers  


6. Tell us about a time when you failed to meet a deadline. What were the repercussions?

0 Answers   AlKhaleej, Swatz Oils,


What is a WebService and what is the underlying protocol used in it? Namespace?

1 Answers  


Why is xap important?

0 Answers  


Explain about asp.net state management?

0 Answers  


What is a multilingual website?

0 Answers  


How do you retrieve information from web.config ?

5 Answers   MMTS,


Categories