Thanks Tim.
On Thu, Jun 16, 2011 at 5:33 PM, Tim Roberts <t...@probo.com> wrote: > Shashwat Sinha wrote: > > > > Thanks for your response. After sending the post I was able to do > > attachments but other properties like SenderEmailAddress are not > > working. It gives me an AttributeError as follows: > > > > Traceback (most recent call last): > > ... > > File "autoMailer.py", line 118, in sendMail > > mail.SenderEmailAddress = 'shashwat...@gmail.com' > > <mailto:%27shashwat...@gmail.com%27> > > File "C:\Python272\lib\site-packages\win32com\client\__init__.py", > > line 470, i > > n __setattr__ > > raise AttributeError("'%s' object has no attribute '%s'" % > > (repr(self), attr > > )) > > *AttributeError: '<win32com.gen_py.Microsoft Outlook 12.0 Object > > Library._MailIte > > m instance at 0x39818584>' object has no attribute 'SenderEmailAddress'* > > C:\Temp> > > Yes, I see now that the documentation says that's a "read-only" > attribute; it is only present when you read an existing message that's > already in your Outlook data store. Apparently, Outlook will only send > messages that come from one of your Outlook identities. > > That's not really much of a surprise. > > > I am confused as 'Attachments' works but not other properties. Could > > you provide some more hints? I was also trying to add signature by > > doing: > > > > mail.AddBusinessCard = 'Signature1' > > AddBusinessCard is a method, not a property. It has to be called like a > function. However, it doesn't accept a simple string; it takes a > ContactItem object, which you would have to get from the list of Outlook > contacts. > > -- > Tim Roberts, t...@probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 >
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32