我有以下代码,我需要更改发件人地址。
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'madanraj.c@xyz.com;madanraj.c@xxxyyy.com'
mail.Subject = 'Daily Backlog'
mail.Body = 'This Mail is Sent by Python'
mail.HTMLBody = '<h2>HTML Message body</h2>' #this field is optional
# To attach a file to the email (optional):
#attachment = "C:\\Users\madanraj.c\Downloads\Report.csv"
#mail.Attachments.Add(attachment)
mail.Send()
print("success")
我的Outlook应用程序中有两个邮件地址,我需要从另一个发送,而不是默认发送。