title: Cannot convert from 'string[]' to 'System.Net.Mail.Attachment'
body: <p>I'm trying to add an attachment to an email I'm sending through my program but I'm getting the error referenced above.<br>
  I'm saving images taken during run time, and adding the name to a List which is called ImageFilenames. I'm then using the following code to retrieve the files and add them as an attachment, but I can't seem to figure out what I need to do to get this working. </p>
  
  <pre><code>            SaveScreenshots();
  
              using (MemoryStream stream = new MemoryStream())
              {
                  using (SmtpClient SmtpServer = new SmtpClient())
                  {
                      using (MailMessage mail = new MailMessage())
                      {
                          mail.From = new MailAddress("*****.******@******.com");
                          mail.To.Add("******@*****.com");
                          mail.Subject = this.Summary;
                          mail.Body = this.ToString();
  
                          SmtpServer.Port = ***;
  
                          foreach (string file in ImageFilenames)
                          {
                              var images = Directory.GetFiles(file);
  
                              mail.Attachments.Add(images); 
  
   //I tried this and the below method with no success
  
                              mail.Attachments.Add(Directory.GetFiles(file));
                          }
  
                          SmtpServer.Credentials = new System.Net.NetworkCredential("******@****.com", "********");
                          SmtpServer.EnableSsl = false;
                          SmtpServer.Host = "*****-1";
  
                          SmtpServer.Send(mail);
                      }
                  }
              }
          }
          ClearScreenCaptures();
  
      }
  </code></pre>
  
  <p>Any help would be appreciated. Thank you! </p>
  
  <p>Edit: Thank you for the suggested related question, but I am aware of how to add an attachment. My question was specifically how to do this using a list of filenames. Thank you though! </p>