title: Download attachment from mail using python
body: <p>I have multiple emails that contain an attachment. I would like to download the attachment for unread emails and with a specific subject line. </p>
  
  <p>for example, I got an email that has a subject "EXAMPLE" and contains an attachment. So how it would be 
  Below code, I tried but it is not working"
  it's a Python code </p>
  
  <pre><code>#Subject line can be "EXAMPLE" 
        for subject_line in lst_subject_line:    
               # typ, msgs = conn.search(None,'(UNSEEN SUBJECT "' + subject_line + '")')
               typ, msgs = conn.search(None,'("UNSEEN")')
               msgs = msgs[0].split()
               print(msgs)
               outputdir = "C:/Private/Python/Python/Source/Mail Reader"
               for email_id in msgs:
                      download_attachments_in_email(conn, email_id, outputdir)
  </code></pre>
  
  <p>Thank You</p>