outlook = win32com.client as win32
mail = outlook.CreateItem(0)
for j in range(list)
file = "C:desktop\\image{}.png".format(j)
attachment = mail.Attachments.Add(file)
index = "ID{}".format(j)
attachment.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F", index)
mail.HTMLBody = "<html><body> image <img src = ""cid:ID%s""></body></html>" % (j)
mail.Send()
The purpose is to embed all images (0,1,2,...maximum number defined by 'list') into the email. But now stuck at the for loop. May I know if there is any method can achieve this purpose? Thanks!