how to add href link in email content when sending email through smtplib

前端 未结 2 1698
忘了有多久
忘了有多久 2020-12-31 05:29

I\'m sending email through below code:

msg = MIMEText(u\'abc\')
msg[\'Subject\'] = \'subject\'
msg[\'From\'] = \'x         


        
2条回答
  •  無奈伤痛
    2020-12-31 05:52

    This worked for me :)

    email_body = """
     
    Congratulations! We've successfully created account.
    Go to the page: click here
    Thanks,
    XYZ Team.
    
    """ msg = MIMEText(email_body ,'html')

    O/P: Congratulations! We've successfully created account.

    Go to the page: click here

    Thanks,

    XYZ Team.

提交回复
热议问题