msg['subject'' test html messagemsg['from']='senderaddressmsg['to''recipientaddresss smtplib smtp('localhost' sendmail('senderaddress'['recipientaddress']msg as_string()print("message sent!"the example follows the same flow as the text message example in the previous section howevernotice that the message now contains html tags you create an html bodynot an entire page this message will have an header and paragraph the most important part of this example is the text that comes after the message the "htmlargument changes the subtype from text/plain to text/htmlso the recipient knows to treat the message as html content if you don' make this changethe recipient won' see the html output choose runrun module the application tells you that it has sent the message to the recipient seeing the -mail output at this pointyou have between one and three application-generated messages (depending on how you've gone through the waiting in your inbox to see the messages you created in earlier sectionsyour -mail application must receive the messages from the server -just as it would with any -mail figure - shows an example of the html version of the message when viewed in output (your message will likely look different depending on your platform and -mail application if your -mail application offers the capability to look at the message sourceyou find that the message actually does contain the information you saw earlier in the nothing is changed or different about it because after it leaves the applicationthe message isn' changed in any way during its trip