Saturday, January 22, 2011

Mail Sending Code in C#


protected void Button1_Click(object sender, EventArgs e)
    {
        MailMessage msg1 = new MailMessage();

        msg1.To = "kunalchakraborty@gmail.com";
        msg1.From = "info@sncindia.org";
        msg1.Subject = "mailchk";
        msg1.BodyFormat = MailFormat.Text;
        msg1.Body = "Dear Sir,";
        SmtpMail.SmtpServer = "127.0.0.1";
        SmtpMail.Send(msg1);
    }

No comments:

SQL Optimization

  SQL Optimization  1. Add where on your query  2. If you remove some data after the data return then remove the remove condition in the sel...