how should email be configured to overcome "/usr/local/lib/python2.6/dist-packages/askbot/utils/mail.py TIME: 2011-02-15 15:10:25,261 MSG: mail.py:send_mail:48 please run connect() first"?
 

I am getting this error in my askbot.log "/usr/local/lib/python2.6/dist-packages/askbot/utils/mail.py TIME: 2011-02-15 15:10:25,261 MSG: mail.py:send_mail:48 please run connect() first"

I'm running django 1.1.2 on Maverick.

I have the following email settings: {{{

mail server settings

SERVER_EMAIL = 'root@answers.ros.org' DEFAULT_FROM_EMAIL = 'root@answers.ros.org' EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' EMAIL_SUBJECT_PREFIX = '' EMAIL_HOST='localhost' EMAIL_PORT='25' EMAIL_USE_TLS=False EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' }}}

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 14 years ago
tfoote's avatar
161
tfoote
asked 14 years ago

Comments

Your settings look right, but the mail server must be running and accept those credentials. Sorry, I am not an expert in mailserver configuration - hope that someone else helps. My settings are as follows: SERVER_EMAIL = '' DEFAULT_FROM_EMAIL = 'askbot@askbot.org' EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' EMAIL_SUBJECT_PREFIX = '[ASKBOT] ' EMAIL_HOST='askbot.org' EMAIL_PORT='25' EMAIL_USE_TLS=False EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' But I might have missed something, the difference I see with your settings is that you have "localhost" and I have domain name in the `EMAIL_HOST` setting.

Evgeny's avatar Evgeny (14 years ago)
btw - there is a code formatting button in the editor toolbar. Something you'll probably need to teach your users about too.
Evgeny's avatar Evgeny (14 years ago)
A couple of questions: When do you get this error - at what operation on the forum? Do you see error 500 screen or on-screen debug traceback - or is it part of the error log file?
Evgeny's avatar Evgeny (14 years ago)
Changing the last line to match fixed it. Thanks
tfoote's avatar tfoote (14 years ago)
Ooopss, sorry the last line I had is a mistake!
Evgeny's avatar Evgeny (14 years ago)
see more comments