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 mta?

0 Answers  


Is viewstate enabled by default?

0 Answers  


Is asp.net and .net the same?

0 Answers  


Can we have multiple web config files for an asp.net application?

0 Answers  


How does the iis work?

0 Answers  






Whats MSIL, and why should my developers need an appreciation of it if at all?

3 Answers   Siebel,


What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

4 Answers  


Is it right that ASP.NET Web API has replaced WCF?

0 Answers  


What is the difference between the get method () and post method ()?

0 Answers  


What are the properties of the eventargs argument when capturing keyboard events?

0 Answers  


Is session stored in browser?

0 Answers  


What is the difference between session and viewstate?

0 Answers  


Categories