I am working on framework 2.I want to send email through my portal.I visited many site.From that I able to understand this much.Here is my code.I have created page design.What is smtpserver.This code giving me error.
System.Web.HttpException: The server rejected the sender address
  MailMessage Msg = new MailMessage();
        // Sender e-mail address.
        Msg.From = txtFrom.Text;
        // Recipient e-mail address.
        Msg.To = txtTo.Text;
        Msg.Subject = txtSubject.Text;
        Msg.Body = txtBody.Text;
        // your remote SMTP server IP.
        SmtpMail.SmtpServer = "smtp.gmail.com";
        SmtpMail.Send(Msg);
        Msg = null;
 
     
     
     
    