335: How to set up EMail working properly

torste******@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 8, 2008
It is totally unclear to me how I setup the system with working EMail support. 

Which facilities does Reviewbord use? What do I need to check on the
machine if Reviewboard will be able to send EMails?


  ./manage.py tests
reports errors. here is the first:


======================================================================
ERROR: Testing sending an e-mail when creating a new review request
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/PAZ/users/ggazweb/tmp/reviewboard-trunk/reviewboard/reviews/tests.py",
line 31, in testNewReviewRequestEmail
    mail_review_request(review_request.submitter, review_request)
  File
"/PAZ/users/ggazweb/tmp/reviewboard-trunk/reviewboard/reviews/email.py",
line 150, in mail_review_request
    {'changes': changes})
  File
"/PAZ/users/ggazweb/tmp/reviewboard-trunk/reviewboard/reviews/email.py",
line 55, in send_review_mail
    current_site = Site.objects.get(pk=settings.SITE_ID)
  File
"/PAZ/python/lib/python2.5/site-packages/django/db/models/manager.py", line
69, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/PAZ/python/lib/python2.5/site-packages/django/db/models/query.py",
line 263, in get
    raise self.model.DoesNotExist, "%s matching query does not exist." %
self.model._meta.object_name
DoesNotExist: Site matching query does not exist.


One issue that might be of interest:
"example.com" does not exist anymore, I added my own site. Its SITE_ID is
3, and I changed that in settings_local.py.


My installation is on a Linux Server (SuSE 10), Python 2.5. 

thanks, towi.
chipx86
#1 chipx86
Try this test:

$ ./manage.py shell
>>> from django.conf import settings
>>> print settings.SITE_ID

Make sure it's what you expect.

Why is your site ID 3, btw? It sounds like that may not be what the actual entry is
in the database for your site.
  • +NeedInfo
#2 torste******@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi,

SITE_ID = 3 is because I first added two new sites and then deleted the example.com
-- instead of following the tutorial suggesting renaming. sorry ;-)

Can't try it out right now, but the shell hint is very useful. I got mail running
now, but the test is still failing. Strange. I can try it again after my vacation.

thanks anyway.
chipx86
#3 chipx86
Sounds like it's working now anyway. Going to close this as a configuration issue.
I'm hoping in the future to have a more streamlined install process that sets this
field automatically, but it'll be a while.
  • -NeedInfo
    +UserError