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

Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?

3 Answers   TCS, Wipro,


What is localhost in asp.net?

0 Answers  


Can we set which type of comparison we want to perform by the CompareValidator control?

0 Answers   MindCracker,


Is asp.net a programming language or framework?

0 Answers  


What kind of data can be stored in viewstate?

0 Answers  


What are the session management techniques asp net?

0 Answers  


What is IPostBack? How to use it?

0 Answers   MCN Solutions,


Name the tools or API for developing or testing web api?

0 Answers  


What are the features of asp.net mvc?

0 Answers  


What kind of programming language is ASP.NET?

0 Answers   3i Infotech,


What are the main requirements for caching?

0 Answers  


What is query string with example?

0 Answers  


Categories