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


Groups > comp.lang.python > #25907

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

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From bruceg113355@gmail.com
Newsgroups comp.lang.python
Subject Python and Outlook, sendinf an image in the body of email
Date Mon, 23 Jul 2012 10:19:40 -0700 (PDT)
Organization http://groups.google.com
Lines 35
Message-ID <641dab69-9782-4bf3-8a01-34237c4f189a@googlegroups.com> (permalink)
NNTP-Posting-Host 206.16.226.196
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1343065410 6140 127.0.0.1 (23 Jul 2012 17:43:30 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Mon, 23 Jul 2012 17:43:30 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=206.16.226.196; posting-account=cxDMTgoAAAD0NMd7UaWriutT-PIoI910
User-Agent G2/1.0
X-Received-Bytes 1824
Xref csiph.com comp.lang.python:25907

Show key headers only | View raw


All,

I am trying to figure out how to send a image in the body of a email when Making a Meeting Request.
Below is my current code.

Thanks,
Bruce


# code below is mainly from http://harunprasad.blogspot.com/2012/01/python-make-meeting-request-appointment.html
# --------------------------------------------------------------------------------------------------------------

import win32com.client
oOutlook = win32com.client.Dispatch("Outlook.Application")
appt = oOutlook.CreateItem(1) 
appt.Start = '2012-07-24 08:00'
appt.Subject = '5th Meeting'
appt.Duration = 60
appt.Location = 'Conference Room, Main'


appt.Body = "This is body text\n"
attach1 = "someimage.jpg"
appt.Attachments.Add (attach1)        #prefer to have attachment inline (body) of email

appt.MeetingStatus = 1 

appt.Recipients.Add("someone@email.com") #enter valid email here

appt.Save()
appt.Send()

print "Done"

Back to comp.lang.python | Previous | NextNext 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