Email sending using ASP.NET
<p>What is the code for E-mail sending using ASP.NET.I have used the code:</p>

<pre><code>DataSet ds = new DataSet();

 SqlConnection con = new SqlConnection("server=kiran-b946c0f6d;database=EmployeeDatabase;uid=sa;pwd=123"); 

con.Open();

string str1 = "SELECT * FROM Employee_Table";

SqlCommand com = new SqlCommand(str1, con);

SqlDataAdapter da = new SqlDataAdapter(str1,con);

da.Fill(ds);

  MailMessage msgmail = new MailMessage();

    msgmail.To = "Firstname.Lastname@tech.com";

    msgmail.Cc = "Webmaster@tech.com";

    msgmail.From = "firstname.lastname@tech.com";

    msgmail.Subject = "hi";

    msgmail.BodyFormat = MailFormat.Html;

    string strbody="&lt;html&gt;&lt;body&gt;&lt;b&gt;Hello World&lt;/b&gt;" + " &lt;font color=\"red\"&gt;ASP.NET&lt;/font&gt;&lt;/body&gt;&lt;/html&gt;";

    msgmail.Body = strbody;


    SmtpMail.Send(msgmail);

    Response.Write("Emai was quicked to disk");

    con.Close();
</code></pre>

<p>Is this code is right?please help me.I am new in this mail sending concept </p>
