Prev: (pywin related) pywintypes.com_error: -2147417846 "Applicationbusy"
Next: win32com calling IE: OLE error 0x800704a6
From: Lie Ryan on 29 Nov 2009 10:55 On 11/27/2009 8:43 PM, Ramdas wrote: > I tried with MIMEBASE but it still fails...... I changed it to > MIMEText, hoping that might trick __handletext to think its a string > Anyway that also doesn't work. > just pass the string directly to MIMEBase.set_payload: fp = open('...') msg1 = MIMEBase(maintype, subtype) msg1.set_payload(fp.read()) either that or use a more specialized subclass of MIMEBase (e.g. MIMEText). |