Forums

Mails deliverying only when reloading website

I'm using this mail configurations that works perfectly on my local PC but on deploy the mails are being sent ONLY when hitting the reload website button. There is no log error and mails are being recorded as sended. What could be happening? Could it be due to threading being disabled?

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'xxxxxxxxx@gmail.com'
EMAIL_HOST_PASSWORD = 'xxxxxxxxx'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

It could be due to threading, yes -- what code are you using to send the emails?