Forwarding to list — please use Reply All… next time. On Mon, Oct 20, 2014 at 6:28 PM, Crush <crushe...@gmail.com> wrote: > Where does the ."format(time=t,date=d)" go? > > I would assume something like > > msgTime = MIMEText() > msgTime.add_header('not sure what to put here?' '<time>' .format(time=t)) > msgRoot.attach(msgTime) > > then in the actual html, something like... > <table><tr><td>{time}</td></tr></table>? > > and yes, for simplicity sake, the date and time will be the same.
Do not bother with MIME for this. It WON’T be simpler. (it’s most likely impossible, in fact.) msgText = MIMEText('<table cellspacing="15" border="1">…rest of your HTML here, complete with {time} and {date} tags…</table>'.format(time=t, date=d), 'html') msgAlternative.attach(msgText) -- Chris “Kwpolska” Warrick <http://chriswarrick.com/> PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor