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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between machine config vs. Web config : Dot net architecture

496


Explain difference between machine config vs. Web config? : .NET Architecture

544


Explain about appdomains?

609


Can I create my own metadata attributes?

532


What are .net mobile controls features? : Microsoft dot net mobile

494






How can implement drag and drop using atlas?

572


Whats new features in Visual Studio 2012?

550


Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form. What is the exact procedure. : Dot net architecture

530


What is .net mobile lists. : Microsoft dot net mobile

478


which is the institute in hyderabad for providing the live project industry training

2334


Explain what does the term "green architecture" mean? : .NET Architecture

523


What is ILDASM ?

663


What is textbox control of .net mobile? : Microsoft dot net mobile

617


Describe the Managed Execution Process in .NET?

541


How do I stop a thread?

543