I would like to be able to send a mail automatically with Python and win32com.client. Here is my code that works:
import win32com.client
o = win32com.client.Dispatch("Outlook.Application")
mail = o.CreateItem(0)
mail.To = "recipient@domain.com"
mail.CC = "..@..."
mail.Subject = "subject"
mail.Body = "main body
mail.Send()
However, I would like to be able to send this mail from another of my Outlook mail addresses. So I would like to put in argument or option the sender of the mail.
I searched a lot on the internet but I didn't find anything.