MailMessage mis = new MailMessage();
SmtpClient smtpserver = new SmtpClient("smtp.gmail.com");
smtpserver.Credentials = new System.Net.NetworkCredential("
[email protected]", "12345");
smtpserver.Host = "smtp.gmail.com";
smtpserver.Port = 587;
smtpserver.EnableSsl = true;
mis.IsBodyHtml = true;
mis.Subject = "DataDUmp send ing excel file error";
smtpserver.Send(mis);
mis.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
When i run the above code in Desktop under datadump folder 2 excel has been downloaded