"Sybren Stuvel" wrote:

> If the HTML document should really be attached, give it a
>     Content-Disposition: Attachment
> header. Check out the accompanying headers as well, by simply emailing
> yourself an attached HTML file and examining the email source.

html = """\
<html>
...
</html>
"""
attachment = MIMEText(html, 'html')
attachment['Content-Disposition'] = 'attachment; filename="sample.html"'
msg.attach(attachment)


# Ah! Yes, that works! Thank you! ;)


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to