You must specify 'html' as a subtype -
msg = MIMEText(u'<a href="www.google.com">abc</a>','html')
Without specifying a subtype separately, the default subtype is 'plain' (plain-text). From the documentation -
class email.mime.text.MIMEText (_text [, _subtype [, _charset]])
A subclass of MIMENonMultipart, the MIMEText class is used to create MIME objects in the body text. _text is a string for the payload. _subtype is a minor type and is equal by default.
(My emphasis).
source share