0 votes
1 view
in Python by (47.7k points)

How can I send the HTML content in an email using Python? I can send a simple text.

1 Answer

0 votes
by (107k points)

You can use the below-mentioned code for sending HTML email using Python:-

from mailer import Mailer 

from mailer import Message 

message = Message(From="[email protected]", To="[email protected]")

message.Subject = "An HTML Email" 

message.Html = """<p>Hi!<br> 

How are you?<br> 

Here is the <a href="http://www.python.org">link</a> you


sender = Mailer('smtp.example.com') 


Related questions

0 votes
1 answer
asked Jul 6 in Azure by Bhamra (24.3k points)
0 votes
1 answer
0 votes
1 answer
asked Sep 25 in Python by Sammy (47.7k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !