I would like to save an email to the drafts folder of a shared mailbox using the win32 API for Outlook. I can save an email to my (default?) mailbox drafts folder using the below:
def TestEmailer(text, subject, recipient):
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = recipient
mail.Subject = subject
mail.HtmlBody = text
mail.Save()
TestEmailer('hello world', 'test', 'recipient@gmail.com')
Thanks to this previous question I can see that the SendUsingAccount()
method can be used to send from a defined mailbox. Is there an equivalent method for saving to the drafts folder of a defined mailbox?