Modified send_mail logic in home/views.py