I'm trying to copy a specific line from the mail body but I don't know how to do that.
I thought regex could solve my problem but didn't know how to implement it again.
mail body:
Line1
line2
line3
line4
line5
line6 - File Name
line7 - count
I want only want to copy the File Name & paste it into an excel file.
import pandas as pd
import win32com.client as client
outlook = cliet.Dispaatch("Outlook.Application"),GetNameSpace("MAPI")
prod_path = outlook.Folders("emailId").Folders[1].Items
#print(prod_path.FolderPath)
mailbox = mailbox.Restrict("@SQL=(urn:schemas:httmail:subject like 'subject')")
listofmails = []
for mail in mailbox:
listofmails.append(mail.body)
#print(mail.body)