title: Python : Sending html format email through SMTP
body: <p>I have a code which sends the emails perfectly, but now I need to make some updates and send the email as html format.
  I tried researching, but they didn't worked for me. How can I change the format to html? For now I'm receiving this code as a string, not html.</p>
  
  <pre><code>    server = smtplib.SMTP('smtp.gmail.com', 587)
      server.ehlo()
      server.starttls()
      server.ehlo()
      server.login(f'{login_email}', f'{login_email_pass}')
      Subject = f'{program_name} : Launch verification'
      server.add_header('Content-Type','text/html')
      Body2 = """\
      &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;body&gt;
  
      &lt;h1 style="color:black;text-align:center;font-family:verdana"&gt;SERVER 51SV15J LAUNCH&lt;/h1&gt;
      &lt;p style="color:black;text-align:center;font-family:courier;font-size:120%"&gt;Code for confirmation is - &lt;b&gt;51256fd.&lt;/b&gt;&lt;/p&gt;
  
      &lt;/body&gt;
      &lt;/html&gt;
  """
      Body = f'{service} just have been started.\nServer Details:\nServer IPV4 : {Ipv4_Address}\nServer IPV6 : {Ipv6_Address}\nServer Region : {Ip_region}\nServer Internet Providers : {Ip_org}\nServer SessionID : {SessionID}\n\n* To verify it, please enter the code : {Code}' 
      msg = f"Subject : {Subject}\n\n{Body2}"
      server.sendmail(
          f'{login_email}',
           f'{test_email}',
          msg
      )
  </code></pre>