Skip to content

Support item.prop(PR_EC_IMAP_EMAIL) or add item.imap() #19

@jelly

Description

@jelly

----> 1 foo.prop(PR_EC_IMAP_EMAIL)

/usr/lib/python2.7/site-packages/zarafa/init.pyc in prop(self, proptag)
1386
1387 def prop(self, proptag):
-> 1388 return _prop(self, self.mapiobj, proptag)
1389
1390 def props(self, namespace=None):

/usr/lib/python2.7/site-packages/zarafa/init.pyc in _prop(self, mapiobj, proptag)
130 def _prop(self, mapiobj, proptag):
131 if isinstance(proptag, (int, long)):
--> 132 mapiprop = HrGetOneProp(mapiobj, proptag)
133 return Property(mapiobj, proptag, mapiprop.Value, PROP_TYPE(proptag))
134 else:

/usr/lib/python2.7/site-packages/MAPI/Defs.pyc in HrGetOneProp(pmp, proptag)
43 if props[0].ulPropTag == proptag:
44 return props[0]
---> 45 raise Struct.MAPIError.from_hresult(props[0].Value)

MAPIErrorNotEnoughMemory: MAPI error 8007000E

this property needs to be streamed in, like the body as you can see here:
In [24]: stream = foo.mapiobj.OpenProperty(PR_EC_IMAP_EMAIL, IID_IStream, 0 ,0)

In [25]: stream
Out[25]: <MAPICore.IStream; proxy of <Swig Object of type 'IStream *' at 0x7f2bbc0ea5d0> >

It would be nice if item.prop() could handle this else we should implement item.eml().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions