Changeset 2715
- Timestamp:
- 10/26/07 05:21:29 (1 year ago)
- Files:
-
- clientsplugin/0.11/cron/send-client-email (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
clientsplugin/0.11/cron/send-client-email
r2713 r2715 94 94 95 95 # Create the root message and fill in the from, to, and subject headers 96 msg_root = MIMEMultipart(' related')96 msg_root = MIMEMultipart('alternative') 97 97 msg_root['To'] = str(', ').join(addresses) 98 98 … … 107 107 msg_root.preamble = 'This is a multi-part message in MIME format.' 108 108 109 # Encapsulate the plain and HTML versions of the message body in an110 # 'alternative' part, so message agents can decide which they want to display.111 msg_alternative = MIMEMultipart('alternative')112 msg_root.attach(msg_alternative)113 114 115 109 view = 'plain' 116 110 result = formatter.applyStylesheet(info, {'view': '"%s"' % view }) 117 111 msg_text = MIMEText(formatter.saveResultToString(result), view, self.encoding) 118 msg_ alternative.attach(msg_text)112 msg_root.attach(msg_text) 119 113 result.freeDoc() 114 115 msg_related = MIMEMultipart('related') 116 msg_root.attach(msg_related) 120 117 121 118 view = 'html' 122 119 result = formatter.applyStylesheet(info, {'view': '"%s"' % view }) 123 120 msg_text = MIMEText(formatter.saveResultToString(result), view, self.encoding) 124 msg_ alternative.attach(msg_text)121 msg_related.attach(msg_text) 125 122 result.freeDoc() 126 123 … … 141 138 fp.close() 142 139 msg_img.add_header('Content-ID', '<%s>' % img.prop('id')) 143 msg_r oot.attach(msg_img)140 msg_related.attach(msg_img) 144 141 result.freeDoc() 145 142
