when I post a comment, do not save, crashes (error: [Errno 111] Connection refused), why?
import time
from calendar import month_name
from
additionally the following will help:
put the following minimal settings in the settings.py or local_settings.py file on your server.
EMAIL_HOST = 'localhost'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
instead of using smtp.gmail.com which imposes lot many limitations, you can have your own mail server.
you can do it by installing your own mailserver:
sudo apt-get install sendmail
For Development and Testing:
In Django 1.6+ we can just add this line in settings.py
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
This will display the mail on the console for Easy Verification.
Note: Mail will not be sent to the specified recipient in Msg.Its just for Development and Testing.
For that you need to configure SMTP server which is given in the Doc.
For Reference: Django Documentation for Sending Email