Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29762

ImportError: No module named django.core.mail

$
0
0

I tried to enable the email functionality of edx, and I followed these steps.

  1. To get the emails working, all you have to do is the following,

  2. Go to cms\envs\common.py

  3. Go to the email portion. Should start with a comment, # Email.

  4. Change EMAIL_BACKEND to 'django.core.mail.backends.smtp.EmailBackend'

  5. Change the DEFAULT_FROM_EMAIL to the email you want to use. Similarly,

  6. for DEFAULT_FEEDBACK_EMAIL and SERVER_EMAIL 

  7. Set EMAIL_HOST to the host of your choice. (e.g - 'smtp.google.com' for Gmail.)

  8. Set EMAIL_HOST_USER to your email id and EMAIL_HOST_PASSWORD to your password.

  9. Set EMAIL_PORT to the port your server uses (587 for Gmail.)

  10. Set EMAIL_USE_TLS to True or False according to your server. (True for Gmail.)

However, when I tried to make a test like this:

>>> from django.core.mail import EmailMessage>>> email = EmailMessage('Hello', 'World', to=['youremail@somewhere.com'])>>> email.send()

the error occured:

Traceback (most recent call last): File "<stdin>", line 1, in <moduleImportError: No module named django.core.mail

I'm a beginner and I've no idea about how to solve this. I've tried to search for solution on the internet and on the websites of Django and edx, but I still don't even have a clue. Could anyone help me with this please? Much appreciate.


Viewing all articles
Browse latest Browse all 29762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>