Sendmail With HTML Message
I am programming with Python. I already have a function that sends an email with a message and an attachment....My only problem is that I want the message to be HTML, but mine does
Solution 1:
replace
msg.attach(MIMEText(text))
by
msg.attach(MIMEText(text, 'html'))
(default is 'plain')
Solution 2:
There is an example on the official documentation page that sends HTML email - http://docs.python.org/library/email-examples.html
Post a Comment for "Sendmail With HTML Message"