0

Using win32com.client in python 3.x, I'm able to access email stored in Outlook 2013. I'm able to access all of the information I need from the emails, except for the email address of the recipients of the email (to, cc, and bcc). I'm able to access the names of the recipients, but not their email addresses. For example, I can see that an email was sent to "John Smith", but not that the email was sent to "john.smith@gmail.com".

Is there a way to access this information?

Grant
  • 13
  • 1
  • 5

1 Answers1

2

Instead of reading the MailItem.To/CC/BCC properties, loop through all items in the MailItem.Recipients collection and read the Recipient.Address property. You might also need Recipient.Type property (olTo, olCC, olBCC) and Recipient.Name.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • Can we somehow access to the Item's time or date? – pRo Jan 18 '22 at 10:55
  • 1
    Which date? There are `MailItem.CreationTime / DeferredDeliveryTime / ExpiryTime / FlagDueBy / LastModificationTime / ReceivedTime / ReminderTime / RetentionExpirationDate / SentOn / TaskCompletedDate / TaskDueDate / TaskStartDate / ToDoTaskOrdinal` properties. – Dmitry Streblechenko Jan 18 '22 at 13:52