I have 2 accounts in ms outlook ('user1@test.com' - default profile ,'user2@test.com') and i'm trying to sent a message by python using the non-default account. Here is my code:
Import win32com.client
app = win32com.client.Dispatch('Outlook.application')
mess = app.CreateItem(0)
mess.to = 'user2@test.com'
mess.subject = 'hi'
mess.SendUsingAccount = 'user2@test.com'
mess.Send()
And outlook sent from account 'user1@test.com', not from 'user2@test.com'. How to change an account?