[python-win32] Problem in accessing the Message body of Outlook Inbox.

Tim Roberts timr at probo.com
Thu Oct 16 19:27:31 CEST 2008


venu madhav wrote:
> Hi all,
>         As of now I got access to the text of the message. Now if I
> want to access the sender address and the receiver address of a mail
> how can I do that? I tried giving message.To and message.From both of
> which didn't work.. :-(. I tried searching in Google for them but
> couldn't come out with the solution.

Are you doing this by guessing, or have you actually read about the CDO
Object Model?
    http://msdn.microsoft.com/en-us/library/ms526930.aspx

"To" cannot be a simple property, because a message can have many
recipients.  In CDO, the MAPI.Message object has a "Recipients"
collection, which is a set of "Recipient" objects.  Each "Recipient" has
Address, Name, and Type properties.

The "Sender" property has the From address.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list