I want to verify whether I am receiving an email from a "sender" with a "subject" and a particular "email" template. I have seen help links with win32 module that works for windows. I want to know the way to read the mails from my Microsoft Outlook from macOS.
Asked
Active
Viewed 941 times
1 Answers
0
I had something similar using appscript library. You would need to have it installed.
pip install appscript
The sample code is something like this, you may to need to extend it for your use case.
from appscript import app, k
def make_msg(text):
outlook = app('Microsoft Outlook')
msg = outlook.make(
new=k.outgoing_message,
with_properties={
k.subject: 'Test Email',
k.plain_text_content: text})
msg.make(
new=k.recipient,
with_properties={
k.email_address: {
k.name: '<My name>',
k.address: '<My email ID>'}})
msg.open()
msg.activate()
if __name__ == '__main__':
make_msg("Sample text")
Let me know if you need more clarification.

ArnabSaha
- 23
- 8
-
The question was about reading emails already received, but your answer is about sending new emails. – AlexM Oct 19 '22 at 14:19