[python-win32] PyIMAPISession && IID_IMAPIAdviseSink

Arn Vollebregt arn.vollebregt at xs4all.nl
Tue Jun 8 10:44:15 CEST 2010


Ah, I found out why the fnevNewMail event doesnt fire: Advise is only
implemented for PyIMAPISession and PyIMAPITable, and not (for example) for
PyIMsgStore and PyIMAPIFolder. The later are the only objects which
receive fnevNewMail: http://msdn.microsoft.com/en-us/library/cc840027.aspx

Will this by any chance be implemented in the near future? Reading C++ is
one thing, but I doubt I'll be able to implement this myself. It looks to
me like a simple copy/paste action isnt going to cut it, going by the code
(difference) in PyIMAPISession.cpp and PyIMAPITable.cpp

Regards,

Arn Vollebregt

> I'd suggest looking for some C++ code which manages to hook that event
> as a point of comparison for what magic needs to be done to make things
> work.
>
> Mark
>
> On 8/06/2010 12:53 AM, Arn Vollebregt wrote:
>> Hi,
>>
>> A while ago I asked a question[1] about hooking MAPI events in Outlook.
>> Although this question was answered[2] back then, I am afraid I am still
>> stuck on the subject: It seems I have been able to hook the AdviseSink,
>> but the onNotify() never fires. However, the fnevNewMail[3] event is
>> seen
>> by OutlookSpy[4] in the IMsgStore::Advise() tab on the folder in
>> question,
>> so I must be doing something wrong.
>>
>> I have attached my example code, and would appreciate any pointers on
>> the
>> subject.
>>
>> Regards,
>>
>> Arn Vollebregt
>>
>> [1]
>> http://mail.python.org/pipermail/python-win32/2009-August/009503.html
>> [2]
>> http://mail.python.org/pipermail/python-win32/2009-August/009504.html
>> [3] http://msdn.microsoft.com/en-us/library/cc765897.aspx
>> [4] http://www.dimastr.com/outspy/
>>
>>
>>
>> _______________________________________________
>> python-win32 mailing list
>> python-win32 at python.org
>> http://mail.python.org/mailman/listinfo/python-win32
>
>



More information about the python-win32 mailing list