我想在Django中的send_mail中发送超链接,我已经将html_message设置为锚,但是它没有用,当我发送h1标签时,它可以正常工作。
代码:
def sendEmail(request):
email = request.POST.get('email', '')
print(email)
html_message='<h1><a href="http://google.com">Click</a></h1>'
send_mail(
'Password Recovery',
'Subject',
'boutrosd@hotmail.com',
[email],
html_message=html_message
)
return JsonResponse(0, safe=False)