MailMessage msgMail = new MailMessage(); msgMail.To = TextBox3.Text; msgMail.From = "abc@gmail.com"; msgMail.Subject = "Attachment Test"; msgMail.BodyFormat = MailFormat.Text; msgMail.Body = "Name:" + txtName.Text + "\n" + "Designation:" + DropDownList1.Value + "\n" + " Phone No:" + TextBox2.Text; String strPath = Path.GetFullPath(MyFile.PostedFile.FileName); msgMail.Attachments.Add(new MailAttachment(strPath)); SmtpMail.Send(msgMail); Response.Write("Email was queued to disk");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)