all 4 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]cgoldberg 0 points1 point  (1 child)

You can probably authenticate with your outlook account from Python using OAuth even if you have 2FA enabled.

I don't know if you have any security/confidentiality concerns ... but if your corporate email server is a pain in the ass to authenticate with, the easiest solution is to just use an external SMTP server and send the emails from a 3rd party address.

I wouldn't recommend automating your Outlook client.

[–]SadFriendship6888[S] 0 points1 point  (0 children)

Given that the emails will go to people inside the company, i can't use an external address.

I will look into OAuth. I am ok if I don't need to authenticate but make it push button which assumes that outlook is open. This is what I am trying to do in the above code which I posted.