[python-win32] get embedded images from outlook (original) (raw)
Tim Roberts timr at probo.com
Tue Jan 8 00:01:11 CET 2008
- Previous message: [python-win32] get embedded images from outlook
- Next message: [python-win32] Python 2.5.1 with Visual Studio 2005
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Antony Joseph wrote:
This code can read the content of mails body , html and headers from outlook. in case , it there's an embedded image, Its not getting the image, ... propids = (PRBODYA,MYPRBODYHTMLA,PRTRANSPORTMESSAGEHEADERSA) hr,data=obj.GetProps(propids,0) body = GetPotentiallyLargeStringProp(obj,propids[0],data[0]) html = GetPotentiallyLargeStringProp(obj,propids[1],data[1]) headers =GetPotentiallyLargeStringProp(obj,propids[2],data[2]) can anybody tell me , how can i get the images?
PR_HASATTACH tells you whether the message has an attachment. Then, you'll have to fetch the attachment table for the message, and fetch the data from that. You may need to do some reading about this. You can fetch the PR_MESSAGE_ATTACHMENTS property to get the table, it is of type IMAPITable, not IStream. You then have to enumerate those, and fetch the PR_ATTACH_DATA_BIN property for the attachment you want.
-- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc.
- Previous message: [python-win32] get embedded images from outlook
- Next message: [python-win32] Python 2.5.1 with Visual Studio 2005
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]