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 five stages in a dlx pipeline? : Dot net architecture

0 Answers  


Explain about the base class library provided by microsoft.net?

0 Answers  


IS IT Possible to inherit the AJAX page from child class which(child) is inherit from page class.Because i should apply some security in child class

0 Answers   IBM,


What is the problem with .net generics?

0 Answers  


I can't be bothered with cas. Can I turn it off?

0 Answers  






when garbage collector come into picture. ?

2 Answers  


What is different about namespace declaration when comparing that to package declaration in java?

0 Answers  


What are the different access modifier? Explain in detail?

2 Answers   Tesco,


How can u manage state ?

2 Answers   Ness Technologies,


What is the difference between absolute expiration and sliding-time expiration?

0 Answers   MindCracker,


Explain the purpose of cache? How is it used? : .NET Architecture

0 Answers  


What happens to the winfx technologies?

0 Answers  


Categories