In this section, we're going to see how we can send multimedia content as an attachment and how we can add HTML content. To do this, we'll use the Python email package.
First, we'll see how we can add HTML content. For that, create a script, add_html_content.py, and write the following content in it:
import os
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import getpass
host_name = 'smtp.gmail.com'
port = 465
sender = 'sender_emailid'
password = getpass.getpass()
receiver = 'receiver_emailid'
text = MIMEMultipart()
text['Subject'] = 'Test HTML Content'
text['From'] = sender
text['To'] = receiver
msg = """\
<html>
<body>
<p>Hello there, <br>
Good day !!<br>
<a...