public HttpResponseMessage ApproveProduct(int productid, string productname, string retailername, string retaileremail) { entities.proc_Approve_Product(productid); string from = "*****@*****.**"; string subject = ""; string body = "Hello " + retailername + ", shopping gladiator Approved your Product" + productname + "changes will be reflected in the app"; SmtpClient smtp = new SmtpClient(); MailMessage mm = new MailMessage(); mm.From = new MailAddress(from); mm.To.Add(retaileremail); mm.Subject = subject; mm.Body = body; smtp.Send(mm); return(Request.CreateResponse(HttpStatusCode.OK, "success")); }