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

How to find last error which occurred in Asp.net ?

0 Answers  


Which data types are supported by the RangeValidator control?

2 Answers   Siebel,


What is a 401 redirect?

0 Answers  


What namespaces are imported by default in ASMX files?

2 Answers  


What is role manager work in web.config? how to restrict perticular pages from the users using the role manager?

1 Answers   Patni,






To display data in a Repeater control which templete is provided ?

4 Answers   Siebel,


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

0 Answers  


How many types of Stored Procedures in SQL Server

4 Answers   Mind Tree,


3. What goals do you have in your career?

0 Answers   Swatz Oils,


What is a Windows Service and how does its life cycle differ from a standard EXE?

2 Answers  


How does session work?

0 Answers  


To wrap up a call to a Web service the standard used is..?

0 Answers   Siebel,


Categories