'Email with no attachment is showing paperclip

I am using Python to send a simple HTML email and have the basic code:

import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.application import MIMEApplication

def send_test_mail(body):
    sender_email = <SenderEmail>
    receiver_email = <ReceiverEmail>

    msg = MIMEMultipart()
    msg['Subject'] = '[Email Test]'
    msg['From'] = sender_email
    msg['To'] = receiver_email
    
    msgText = MIMEText('<b>%s</b>' % (body), 'html')
    msg.attach(msgText)

    try:
        with smtplib.SMTP_SSL('smtp.gmail.com', 587) as smtpObj:
            smtpObj.ehlo()
            smtpObj.login(<LoginUserName>, <LoginPassword>)
            smtpObj.sendmail(sender_email, receiver_email, msg.as_string())
    except Exception as e:
        print(e)
       
if __name__ == "__main__":
    send_test_mail("Welcome to Medium!")

This has been put together from a couple of sources from within the stackexchange community but the intention is only to send a straightforward email.

But, when it is received, I get the paperclip icon indicating there is an attachment when there clearly isn't one. https://i.stack.imgur.com/Ysj3g.png

Python is not my strong point but I'm sure it has more to do with SMTPLIB rather than python.

Does anyone know what is going on here?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source