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

how can we achieve language interoperability through CLS? How MSIL works?

0 Answers   EDS,


7. Oop-Diff B/w Interfacse and abstract class.

3 Answers   PCS,


what is the method while we are using adapter and dataset ?

0 Answers  


Can I create my own permission set?

0 Answers  


What is the mesi? : .NET Architecture

0 Answers  






Explain the use of virtual, sealed, override, and abstract.

0 Answers  


how can u manage sessions ?

3 Answers   Ness Technologies,


Wcf- What is ABC

1 Answers   PCS,


Differnce between managed code and unmanaged code ?

0 Answers  


Can I create my own metadata attributes?

0 Answers  


What is abstact class? in which scinario we can use abstact class?

4 Answers   iGate,


Explain the difference between primary & secondary storage device? : .NET Architecture

0 Answers  


Categories