I am trying to send an email on behalf of a shared account in outlook.
Using win32com, I am able to read the emails in the shared account, but not send an email from it (It would be on behalf of). As from what I understand, the shared account is not something you can log into, but an owner has granted access for people to use it.
when doing
outlook = win32.Dispatch('outlook.application') for account in outlook.Session.Accounts: print(account.DisplayName) outlookInbox = outlook.GetNamespace("MAPI") for folder in outlookInbox: print(folder.name)
I get just my account in the accounts, and my account and the shared folders in the inbox
This leads me to believe that in order for me to send an email from a shared account, I need to log in, but, there is no password for me to log into it.
I have also tried using
mail.SendUsingAccount = "email@account" mail.Sender = "email@account" mail._oleobj_.Invoke(*(64209, 0, 8, 0, "email@account"))
But none of them seem to work.
submitted by /u/Alongsnake
[link] [comments]
r/learnpython I am trying to send an email on behalf of a shared account in outlook. Using win32com, I am able to read the emails in the shared account, but not send an email from it (It would be on behalf of). As from what I understand, the shared account is not something you can log into, but an owner has granted access for people to use it. when doing outlook = win32.Dispatch(‘outlook.application’) for account in outlook.Session.Accounts: print(account.DisplayName) outlookInbox = outlook.GetNamespace(“MAPI”) for folder in outlookInbox: print(folder.name) I get just my account in the accounts, and my account and the shared folders in the inbox This leads me to believe that in order for me to send an email from a shared account, I need to log in, but, there is no password for me to log into it. I have also tried using mail.SendUsingAccount = “email@account” mail.Sender = “email@account” mail._oleobj_.Invoke(*(64209, 0, 8, 0, “email@account”)) But none of them seem to work. submitted by /u/Alongsnake [link] [comments]
I am trying to send an email on behalf of a shared account in outlook.
Using win32com, I am able to read the emails in the shared account, but not send an email from it (It would be on behalf of). As from what I understand, the shared account is not something you can log into, but an owner has granted access for people to use it.
when doing
outlook = win32.Dispatch('outlook.application') for account in outlook.Session.Accounts: print(account.DisplayName) outlookInbox = outlook.GetNamespace("MAPI") for folder in outlookInbox: print(folder.name)
I get just my account in the accounts, and my account and the shared folders in the inbox
This leads me to believe that in order for me to send an email from a shared account, I need to log in, but, there is no password for me to log into it.
I have also tried using
mail.SendUsingAccount = "email@account" mail.Sender = "email@account" mail._oleobj_.Invoke(*(64209, 0, 8, 0, "email@account"))
But none of them seem to work.
submitted by /u/Alongsnake
[link] [comments]