[python-win32] Using win32com.mapi to automate mail dispatch...

Varun Avashia varun at aryaka.com
Tue Apr 27 06:05:28 CEST 2010


Yes Tim, the user has Admin privileges, and eid has a -ve value of -2147221233.....

-----Original Message-----
From: python-win32-bounces+varun.avashia=aryaka.com at python.org [mailto:python-win32-bounces+varun.avashia=aryaka.com at python.org] On Behalf Of Tim Roberts
Sent: Tuesday, April 27, 2010 4:22 AM
To: Python-Win32 List
Subject: Re: [python-win32] Using win32com.mapi to automate mail dispatch...

Varun Avashia wrote:
>
>  
>
> I tried to follow the code on this link
> http://mail.python.org/pipermail/python-win32/2004-August/002239.html
>
>  
>
> This worked fine for me on win7 with Outlook2k7 (CDO were installed
> separately), However this failed to work on winxp with sp2 and
> outlook2k7 (with CDO installed) with following trace-back….
>
>  
>
> Traceback (most recent call last):
>
>   File "C:\Documents and
> Settings\Administrator\Desktop\send1kMail.py", line 73,
>
>  in <module>
>
>     SendEMAPIMail(SendSubject, SendMessage, SendTo,
> MAPIProfile=MAPIProfile)
>
>   File "C:\Documents and
> Settings\Administrator\Desktop\send1kMail.py", line 28,
>
>  in SendEMAPIMail
>
>     outboxfolder = msgstore.OpenEntry(eid,None,mapi.MAPI_BEST_ACCESS)
>
> TypeError: EntryID must be a string or None
>
>  
>
> Am I missing any additional components for WinXP?
>
>  
>
> The eid variable at line 27 has a value of -2147221233…
>

For what it's worth, that's 0x8004010F, which is MAPI_E_NOT_FOUND.

You might want to print out the "eid" that you fetched in the line
immediately preceding.  Perhaps something went wrong with fetching the
outbox ID.  Has Outlook 2007 actually been configured for Administrator
on this machine?

-- 
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


More information about the python-win32 mailing list