I have the following in my settings in the django rest framework app:
#settings.py
REST_USE_JWT = True
SITE_ID = 1
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'mytestaccountPassword'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
ACCOUNT_EMAIL_REQUIRED = True
with this settings I can sign up a new user and the following message pops up in console upon registration :
"""""From: [email protected] To: [email protected] Date: Sat, 05 Jan 2019 05:15:11 -0000 Message-ID: <154666531119.43600.12499673333763651759>
Hello from example.com!
You're receiving this e-mail because user amir3 has given yours as an e-mail address to connect their account.
To confirm this is correct, go to http://127.0.0.1:8000/rest-auth/registration/account-confirm-email/OA:1gfeIh:QM0KigIvCJXX5otapkQccUMfbwk/
Thank you from example.com! example.com""""""
my question is that how can I make it to actually email me rather than just printing in console. I tried the following setting instead:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
but what happens is that the user will be added to the database with no email sent, let alone verifying by clicking the link,
Would you please let me know what am I missing here,
Thanks,