Posted on: 8/4/2014 7:06:45 PM | Views : 412

hi my friends
i created a page for sending email for my website users , this codes work correctly but i have 2 problem here
1-when i send a email , that email gone on spam folder ( i want email go on inbox folder)
2-when i select a file through FileUpload control i must upload it on web directory then send it from there (i can't get file path with FileUpload control)
how i can fix my problems?
public void Get_SendMail(string mailBody,FileUpload fu) { var mail = new MailMessage(); try { mail.To.Add(progEmails); mail.From = new MailAddress("myemail@gmail.com"); mail.Subject = "subject"; mail.Body = mailBody; if (fu.HasFile) { fu.SaveAs(HttpContext.Current.Server.MapPath("~/Documents/upfiles/" + fu.FileName)); mail.Attachments.Add(new Atta ...

Go to the complete details ...