using (MailMessage mm = new MailMessage("from email", "To email")
{
StreamReader reader = new StreamReader(System.Web.HttpContext.Current.Server.MapPath("~/HtmlPage.html"));
string readFile = reader.ReadToEnd();
string myString = "";
myString = readFile;
string fname=dttemp.Rows[0][1].ToString();
myString = myString.Replace("$$fname$$", fname);
mm.Subject = "Your Subject";
mm.Body = myString.ToString();
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
NetworkCredential NetworkCred = new NetworkCredential("from Email", "From Password");
smtp.UseDefaultCredentials = false;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
}