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

bruceg113355 at bruceg113355 at
Mon Jul 23 19:19:40 CEST 2012


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.


# code below is mainly from
# --------------------------------------------------------------------------------------------------------------

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 at") #enter valid email here


print "Done"

More information about the Python-list mailing list