using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Net.Mail; using System.Text; public partial class Send : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnSend_Click(object sender, EventArgs e) { MailMessage message = new MailMessage(); message.To.Add(new MailAddress("careers@jobcom.in")); message.Subject = "Application For Job No." + Request["Id"].ToString(); message.Body = txtcover.Text; message.Attachments.Add(new Attachment(fUcv.PostedFile.InputStream, fUcv.FileName)); SmtpClient client = new SmtpClient(); try { client.Send(message); lblmsg.Text = "Your Application Send Successfully. We will contact You soon."; } catch { lblmsg.Text = "Sorry..Try after some time."; } } }