[python-win32] Problem in accessing the Message body of Outlook Inbox.
venu madhav
venutaurus539 at gmail.com
Thu Oct 16 08:11:35 CEST 2008
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.
Thanks in Advance.
Venu.
On Fri, Oct 10, 2008 at 9:50 PM, Tim Roberts <timr at probo.com> wrote:
> venu madhav wrote:
> >
> > Here is the code:
> >
> > rom win32com.client import Dispatch
> >
> > session = Dispatch("MAPI.session")
> > session.Logon('outlook') # MAPI profile name
> > inbox = session.Inbox
> > for i in range(inbox.Messages.Count):
> > message = inbox.Messages.Item(i + 1)
> > f.write(message.Subject+"\n\n")
> > f.write(message.Body+"\n\n\n")
> >
> > Hope you could get some idea based on this..
>
> I believe you want the "Text" property, not the "Body" property.
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20081016/17a78790/attachment.htm>
More information about the python-win32
mailing list