Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #25919

Re: Python and Outlook, sendinf an image in the body of email

References <641dab69-9782-4bf3-8a01-34237c4f189a@googlegroups.com> <22e9b14a-d660-4ec9-a67b-0fcdc9ef1463@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2012-07-23 14:32 -0600
Subject Re: Python and Outlook, sendinf an image in the body of email
Newsgroups comp.lang.python
Message-ID <mailman.2496.1343075588.4697.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Jul 23, 2012 at 12:33 PM,  <bruceg113355@gmail.com> wrote:
> I tried something similar to the example at http://stackoverflow.com/questions/4312687/how-to-embed-images-in-email .
>
> Problem is, this line is not understood:
>        mail.BodyFormat = OlBodyFormat.olFormatHTML
>
>     Traceback (most recent call last):
>       ...
>       appt.BodyFormat = OlBodyFormat.olFormatHTML
>     NameError: name 'OlBodyFormat' is not defined

Assuming you've run makepy to generate the static dispatch Python module for the
Outlook type library, all generated constants are available via
win32com.client.constants  Try:

appt.BodyFormat = win32com.client.constants.olFormatHTML

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python and Outlook, sendinf an image in the body of email bruceg113355@gmail.com - 2012-07-23 10:19 -0700
  Re: Python and Outlook, sendinf an image in the body of email Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-23 12:11 -0600
  Re: Python and Outlook, sendinf an image in the body of email bruceg113355@gmail.com - 2012-07-23 11:33 -0700
    Re: Python and Outlook, sendinf an image in the body of email python@bdurham.com - 2012-07-23 16:20 -0400
    Re: Python and Outlook, sendinf an image in the body of email Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-23 14:32 -0600
      Re: Python and Outlook, sendinf an image in the body of email bruceg113355@gmail.com - 2012-07-23 14:24 -0700
      Re: Python and Outlook, sendinf an image in the body of email bruceg113355@gmail.com - 2012-07-23 14:24 -0700
        Re: Python and Outlook, sendinf an image in the body of email bruceg113355@gmail.com - 2012-07-23 17:42 -0700
        Re: Python and Outlook, sendinf an image in the body of email bruceg113355@gmail.com - 2012-07-23 17:42 -0700
    Re: Python and Outlook, sendinf an image in the body of email Emile van Sebille <emile@fenx.com> - 2012-07-23 14:02 -0700

csiph-web