Django email not sending — no error, but messages don’t arrive (using Gmail SMTP)
I’m trying to send emails from my Django project using Gmail’s SMTP server. The server runs without any errors, and my code executes successfully, but the emails never reach the recipient — not even in the spam folder.
I’ve enabled 2-Step Verification on my Gmail account and generated an App Password specifically for this project, but it still doesn’t work.
I want to understand why Django thinks the email was sent but it never actually arrives.
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 465
EMAIL_USE_SSL = True
EMAIL_HOST_USER = 'mygmail@gmail.com'
EMAIL_HOST_PASSWORD = 'my-16-digit-app-password'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
i the Expected result was Recipient receives the email. but the actual result is Email never arrives, and no errors are raised.