1

I want to send a hyperlink inside the send_mail in Django , i have set html_message to an anchor but it didn't work , when i am sending an h1 tag it is working fine.

Code:

  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)
mostafazh
  • 3,834
  • 1
  • 18
  • 26
Boutros
  • 177
  • 1
  • 2
  • 14

0 Answers0