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

what is the need of vss to developer?

1 Answers  


Different types of authentication modes in .net framework ?

0 Answers  


What are library functions?

0 Answers   DELL,


server.transfer limitation ?

0 Answers  


2. I've a class Parent Class A and a Derived Class B. Here is a scenario. I've an instance of Class A as objA and an instance of Class B as objB. I can refer a child class variable as objB=objA, but cannot do objA=objB what is the reason?

2 Answers   247Customer,






What is the difference between abstract class and Interface? Give an example how will u write an abstract class using .NET Framework

4 Answers   T3 Softwares,


Differences between VS 2005, 2008 and 2010 ?

0 Answers   HCL,


What i sthe meaning of .(dot) in .Net?

9 Answers   HCL,


Explain write back and write through caches? : Dot net architecture

0 Answers  


.Net Frame work arch?

0 Answers  


How to work with Crystal Reports without using Visual Studio?

1 Answers  


Define cache? : Dot net architecture

0 Answers  


Categories