I'd like to receive email for every new question, as well as every new answer. My notifications and subscription settings look like this:

  • Notify me when: A new question is posted (Instantly)
  • Auto subscribe me to: All questions
  • On my subscriptions, notify me when: An answer is posted, A comment is posted

I get emails when somebody posts a new question, but I don't receive emails when there are new answers. How do I track down the problem?

I've tracked the problem down so far to this code in forum/subscriptions.py, answer_accepted.py:

subscribers = question.subscribers.filter(
        subscription_settings__enable_notifications=True,
        subscription_settings__notify_accepted=True,
        subscription_settings__subscribed_questions='i'
).exclude(id=action.node.nstate.accepted.by.id).distinct()

The line subscription_settings__subscribed_questions='i' is filtering out the subscribed user. What is the purpose of this code?

asked 30 Nov '10, 16:51

lorin's gravatar image

lorin
1113611
accept rate: 100%

edited 12 Dec '10, 16:38

Check your logs, there's probably some exception being thrown during the rendering of the emails or something, but that happens in a different thread, so the only way to check it is in the log.

(01 Dec '10, 19:15) Hernani Cerq... ♦♦

I stepped through send_email_alerts.py to see what was happening. Even if I add a new answer, digest.count is 0, so send_template_email doesn't get sent out. I assume that only sends out new questions, and not new answers. Where is the code that sends out email when there's a new answer, if the user has subscribed?

(12 Dec '10, 16:06) lorin

Figured out the problem. I had forgotten to set the "There's an update on one of my subscriptions" notification setting to "Instantly".

link

answered 12 Dec '10, 20:31

lorin's gravatar image

lorin
1113611
accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×101
×24

Asked: 30 Nov '10, 16:51

Seen: 593 times

Last updated: 12 Dec '10, 20:31

powered by OSQA