outlook

Embedding images using CID refs with Outlook MailItem object not displaying in email

Embedding images using CID refs with Outlook MailItem object not displaying in email Question: Trying to use an Outlook signature through Python (using 3.10.6 for this example), however the images within the signature are not being displayed. Just shows the typical broken image with "The picture can’t be displayed." Here is what I am using …

Total answers: 1

Remove the "RE:" when replying to emails using Python

Remove the "RE:" when replying to emails using Python Question: I am using python to automate some outlook email replies and I need to remove the "RE:" from the subject when using the email.ReplyAll(), I tried to do email.Subject = subject before replying but it still adds the "RE:". FYI, I do not intend to …

Total answers: 1

Why only the first one can get the email invitation via Python icalendar

Why only the first one can get the email invitation via Python icalendar Question: I have a script that will run periodically to send email invitations to all receivers to inform them about upcoming maintenance. Here is the code example import os import uuid import smtplib import icalendar import datetime from email.mime.base import MIMEBase from …

Total answers: 2

Determine currently selected Outlook profile

Determine currently selected Outlook profile Question: I’m dealing with several Office installations that have two profiles, primarily in order for the Exchange connection in one profile not to break normal (caldav) based calendars in the other profile. There are some actions that only should only be applied when a particular profile is active. I detect …

Total answers: 1

Win32 not recognising the outlook email in Jupyter notebook

Win32 not recognising the outlook email in Jupyter notebook Question: Tried to read the outlook email in jupyter notebook for creating a ML algorithm but the win32 is not recognising my outlook account. It was working fine yesterday but somehow same code not wrking today. Any suggestions please? Attached my code below. import win32com #.client …

Total answers: 2

Sending emails with outlook using Python and HTML

Sending emails with outlook using Python and HTML Question: How do I successfully use a sender account with a password that is not already signed in to on the Outlook application on my laptop? I want to send a message from the example account, "[email protected]" but it has a password. I have this password. Am …

Total answers: 1

How to trigger Python script when sending an Outlook email?

How to trigger Python script when sending an Outlook email? Question: I would like to trigger a Python script when I send an email through Outlook. So far I have only seen solutions to trigger a Python script when an email is received but not when sending an email. Asked By: ronmakh || Source Answers: …

Total answers: 2

Unable to loop correctly

Unable to loop correctly Question: I am working on assignment to extract emails from the mailbox. Below are my codes, I am referencing from this case and combine with some other research online: import win32com.client import pandas as pd import os outlook = win32com.client.Dispatch("Outlook.Aplication").GetNamespace("MAPI") inbox = outlook.GetDefaultFolder(6).Folders["Testmails"] condition = pd.read_excel(r"C:UsersAsusDesktopPythonCondition.xlsx", sheet_name = ‘endword’) emails = …

Total answers: 2

Viewing content of outlook attachment in python

Viewing content of outlook attachment in python Question: I’m trying to use python to get some data that is in an attachment on an outlook email and then use that data in python. I’ve managed to write the code that will get into the outlook inbox and folder I want and then get the attachments …

Total answers: 2

Unable to save email attachment from outlook to local drive

Unable to save email attachment from outlook to local drive Question: i have written the below code to save email attachment from outlook with specific subject but its throwing an error. Below is the code : import win32com.client import os outlook = win32com.client.Dispatch(‘outlook.application’).GetNamespace("MAPI") inbox = outlook.Folders(‘xyz.com’).Folders("Inbox") messages = inbox.Items for msg in messages: if ‘Subject’ …

Total answers: 1