Sending Email Via Django
In your settings.py, set following configuration,
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'mydomain@gmail.com'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
Now, go to python shell and,
from django.core.mail import send_mail
Now call below function,
send_mail('Subject of email',
'Here is the message.',
'from@example.com',
['to@example.com'],
fail_silently=False,
)
Thats all, an email with subject "Subject of email" and body "Here is the message" has been sent to your "to@example.com" email.