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
  • 4,144
  • 1
  • 20
  • 26
Boutros
  • 207
  • 1
  • 3
  • 15

0 Answers0