title: Wrong path in mail attachment
body: <p>Here i need when file uploaded then i need that file attached and mail to it.But attachment file path wrong.</p>
  
  <blockquote>
    <p>Error : Could not find file 'C:\Program Files (x86)\IIS Express\test.xlsx'. //&lt;--Wrong file path</p>
  </blockquote>
  
  <p>Code</p>
  
  <pre><code>            for (int i = 0; i &lt; fuUploadedFiles.UploadedFiles.Count; i++)
          {
              if (fuUploadedFiles.UploadedFiles[i] != null)
              {
                  fuUploadedFiles.UploadedFiles[i].SaveAs(ServerPath + "\\" + fuUploadedFiles.UploadedFiles[i].FileName);
  
                  using (MailMessage mm = new MailMessage())
                  {
                      if (fuUploadedFiles.UploadedFiles.Count != null)
                      {
                          string FileName = fuUploadedFiles.UploadedFiles[i].FileName;
                          mm.Attachments.Add(new Attachment(FileName));//&lt;-- Error generate here
                          SmtpClient smtp = new SmtpClient();
                          smtp.Host = "smtp.gmail.com";
                          smtp.EnableSsl = true;
                          NetworkCredential NetworkCred = new NetworkCredential("myemail@email.com", "mypassword");
                          smtp.UseDefaultCredentials = true;
                          smtp.Credentials = NetworkCred;
                          smtp.Port = 587;
                          smtp.Send(mm);
                      }     
                  }
              }
          }
  </code></pre>