title: win32com.client to send different attachments instead of fixed file path
body: <p>I am able to send email to different recipients on outlook with below script for single attachment, but if I try to send different attachments to each user using for loop, then it fails.</p>
  <p>Currently the script is using <code>attachment = r'C:\Users\roy\Royfile.csv'</code>. But I want <code>attachment = file</code>, so that the attachment changes in each for loop for different users. This part is not working.</p>
  <p>Different files for different users, example <code>Royfile.csv</code> below. But there are 50 more such files.</p>
  <pre><code>Folder        FolderOwner    EmailAddress      AttachmentPath
  C:\folder1\   Roy            Roy@gmail.com     Royfile.csv
  D:\folder2\   Roy            Roy@gmail.com     Royfile.csv
  </code></pre>
  <p>2nd file in same folder <code>Jackfile.csv</code>:</p>
  <pre><code>Folder        FolderOwner    EmailAddress      AttachmentPath  
  C:\folder3\   Jack            Jack@gmail.com   Jackfile.csv
  D:\folder4\   Jack            Jack@gmail.com   Jackfile.csv 
  </code></pre>
  <p>3rd file for example <code>Mandyfile.csv</code>. And same way total 50 files for 50 users in same folder.</p>
  <pre><code>Folder        FolderOwner    EmailAddress        AttachmentPath
  C:\folder5\   Mandy            Mandy@gmail.com   Mandyfile.csv
  D:\folder6\   Mandy            Mandy@gmail.com   Mandyfile.csv
  </code></pre>
  <p>Python Script</p>
  <pre><code>import glob, as
  import win32com.client as win32
  import pandas as pd
  
  for file in glob.glob(&quot;*file.csv&quot;):
      print(file)
  
      email_list = pd.read_csv(file)
      names = email_list['FolderOwner']
      emails = email_list['EmailAddress']
      attachments = email_list['AttachmentPath']
  
      for i in range(len(emails)):
         print(file)
         name = names[i]
         email = emails[i]
         attachment = r'{}.csv'.format(attachments)
         with open(attachment, 'r') as my_attachment:
            myfile = my_attachment.read()
      
         outlook = win32.Dispatch('outlook.application')
         mail = outlook.CreateItem(0)
         mail.To = email
         mail.Subject = 'Message subject'
         mail.Body = 'Hello ' + name
         mail.Attachments.Add(attachment)
         mail.Send()
         break
  </code></pre>
  <p>Current output of the script if I remove the attachment part:</p>
  <pre><code>Royfile.csv
  Royfile.csv
  Jackfile.csv
  Jackfile.csv
  Mandyfile.csv
  Mandyfile.csv
  ...
  ..
  .
  </code></pre>
  <p>Struggling now with what needs to be for attachment = ???. So that each file gets sent to 50 users.</p>