How to send e-mail to gmail/yahoo or any other ID from your
mail server.I need the code.



How to send e-mail to gmail/yahoo or any other ID from your mail server.I need the code...

Answer / sunny

using System.Net.Mail;

public partial class _Default : System.Web.UI.Page
{
protected void btnsendmail_Click(object sender,
EventArgs e)
{
SmtpClient obj = new SmtpClient();
obj.Send(txt_from.Text, txt_to.Text,
txt_subject.Text, txt_body.Text);
}
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Dot Net AllOther Interview Questions

Explain the difference between inprocess vs out process session state : Dot net architecture

0 Answers  


What is .net mobile lists. Explain with an example? : Microsoft dot net mobile

0 Answers  


The maximum report processing jobs limit configured by your system administrator has been reached.How I can Solve this problem when i using crystal report to load from my application.

2 Answers  


What are different types that a variable can be defined and their scopes ?

0 Answers  


Why only boxed types can be unboxed?

0 Answers  






What happens to the winfx technologies?

0 Answers  


How do I stop a thread?

0 Answers  


What exactly is being serialized when you perform serialization? scope in C# ?

1 Answers  


Explain the types of memory management? : .NET Architecture

0 Answers  


What is a virtual memory? : Dot net architecture

0 Answers  


Explain the difference between primary & secondary storage device? : Dot net architecture

0 Answers  


There are so many languages are already existing for developing application.Then what is the need of .net.

1 Answers  


Categories