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
111●3●6●11
accept rate:
100%
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.
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?