title: Send a mail as a reply using SmtpClient
body: <p>Scenario : Need to send a mail which is actually a reply mail from an asp.net c# program. I managed the mail to be sent to the client, but it sends as a new mail.</p>
  
  <p>Code : </p>
  
  <pre><code>var SMTP = _genRepository.GetData("SELECT * FROM LOCATION WHERE ID='" + mail.LocationId + "'").FirstOrDefault();
  SmtpClient c = new SmtpClient(SMTP.SMTP_Host, SMTP.SMTP_Port);
  MailAddress add = new MailAddress(mail.From);
  MailMessage msg = new MailMessage();
  msg.To.Add(add);
  msg.From = new MailAddress(SMTP.Email);
  msg.IsBodyHtml = true;
  msg.Subject = mail.Subject;
  msg.Body = mail.Body;
  c.Credentials = new System.Net.NetworkCredential(SMTP.Email, SMTP.EmailPassword);
  c.EnableSsl = true;
  c.Send(msg);
  </code></pre>
  
  <p>I have the sender's email messageid. I just need to know how to send the mail as a reply.</p>