email - ImportError: No module named django.core.mail -
i tried enable email functionality of edx, , followed these steps.
to emails working, have following,
go cms\envs\common.py
go email portion. should start comment, # email.
change email_backend 'django.core.mail.backends.smtp.emailbackend'
change default_from_email email want use. similarly,
for default_feedback_email and server_email
set email_host host of choice. (e.g - 'smtp.google.com' gmail.)
set email_host_user email id , email_host_password password.
set email_port port server uses (587 gmail.)
set email_use_tls true or false according server. (true gmail.)
however, when tried make test this:
>>> 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 <module importerror: no module named django.core.mail i'm beginner , i've no idea how solve this. i've tried search solution on internet , on websites of django , edx, still don't have clue. me please? appreciate.
probably pythonpath variable not set correctly. start django this:
./manage.py shell and try command:
import django if raises error, need set pythonpath environment variable in way contains path django directory.
Comments
Post a Comment