Re: using the email module




"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! ;)


.



Relevant Pages

  • Re: using the email module
    ... what I see is the HTML rendered in the body of the message, ... Check out the accompanying headers as well, ... yourself an attached HTML file and examining the email source. ...
    (comp.lang.python)
  • Compress and email file?
    ... I need to compress (gzip) an html file from a cgi script before ... emailing the file, any ideas how? ...
    (perl.beginners)
  • Re: Compress and email file?
    ... I need to compress (gzip) an html file from a cgi script before ... > emailing the file, any ideas how? ...
    (perl.beginners)