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

i need code for insert,delete,update adn display records using stored procedure in C#

2 Answers  


What are the intrinsic objects present in ASP.NET

1 Answers   IBM,


Can we use the java script code in .Net Code behind?

5 Answers   eXensys,


What is the recommended approach for asp.net mvc to globally intercept exceptions? What other functionality can be implemented with the approach? : Asp.Net MVC

0 Answers  


What is http pipeline in asp.net?

0 Answers  






How we can bind textbox,listbox and datagrid to sql server database in asp.net using visualstudio.net language (vb.net)?

2 Answers   rocsearch,


How many types of sessions are there?

2 Answers  


What is Web Gardening? How would using it affect a design ?

1 Answers   Infogain,


What is event in asp.net?

0 Answers  


How many Directives r in ASP.NET?

8 Answers  


how to retrieve data using web services in asp.net pls give me the code and explain me briefly

3 Answers  


How to disable disable browser's Back button in asp.net (JavaScript)?

0 Answers   HCL,


Categories