if (Page.IsValid)
{
string from = "sandeepchrs@yahoo.com";
string to = txtemailto.Text.ToString().Trim();
string subject = txtmailsubject.Text.ToString().Trim();
string body = txtemailmsg.Text.ToString().Trim();
string filename = Path.GetFileName(FileUpload1.FileName);
string fileAttach = FileUpload1.SaveAs(Server.MapPath("Attachement") + "\\" + filename); ;
sendmail.SendMailMessage(from, to, subject, body, fileAttach);
}
ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/