I read from
http://www.packtpub.com/article/friends-via-email-social-web-application-django-1.0
and follow the steps: => And change my setting.py
You code looks correct, so I think there is a problem with your settings. Are you positive that specified the EMAIL_HOST
and EMAIL_PORT
correctly?
Note: Its EMAIL_USE_TLS
not MAIL_USE_TLS
and you can set your from address (3rd parameter in send_mail function) to None
if you want it to take your DEFAULT_FROM_EMAIL
value.
'Connection timed out' means Django couldn't connect to your email server. Type this on a command line:
telnet smtp.xxxx.com.kh 25
You should get a response from the email server, something like:
220 rufus Python SMTP proxy version 0.2
If you don't get a response,you have found the problem.
Here's a handy command to run a local development server, on Linux:
sudo /usr/lib/python2.6/smtpd.py -n -c DebuggingServer 127.0.0.1:25