ive done this before but send_mail is not working now. i do have my credentials right and don’t know y its not working. i mean its going through the process and returning the page i want but im not getting emails.
settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAiL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'example@gmail.com'
EMAIL_HOST_PASSWORD = '**********'
views.py
subject = subj
message = "This is my message"
sender = settings.EMAIL_HOST_USER
to = ['example2@gmail.com',]
send_mail(subject, message, sender, to, fail_silently= True)
i also made sure that i am getting the form input right. The page is throwing no errors as well.
Note: i have enabled 2-step verification for the sender email and i have also setup an app password for the sender mail.
i have turned off fail_silently to debug and this is the error page i get: