First time here? Check out the FAQ!
1

How to debug email sending?
 

I have a user who is not recieving emails despite having set his email address and subscribed to notifications. His profile inbox shows the notifications reaching him. However he does not get any email. Most people who have complained before have been getting the emails, but they were getting spam filtered. However in his case I do not see the emails in the mail.log on the server.

How can I debug where the notifications are getting lost before getting to the email?

Edit: I've checked their subscriptions settings are all set to instant. They are sending selected tags. And they have several active tags selected on the home screen.

I don't see any reference to his email in /var/log/mail.log

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)
tfoote's avatar
161
tfoote
asked 11 years ago, updated 11 years ago

Comments

see more comments

2 Answers

1

He/she must have subscriptions enabled (check profile->subscribtions tab).

Then - look at mail.log there may be clues of rejected messages, after that receiving mail server log and the spam mail box.

Some mail servers are very zealous at filtering messages.

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
answered 11 years ago
link

Comments

see more comments
0

Try to debug on the console: You will get debug information, everytime.

python-2.7 manage.py shell 
>>> from django.core.mail import EmailMessage
>>> email = EmailMessage('email Testing', 'This is a test for that Strange user', to=['Thatuser@Hisdomain.com'])
>>> email.send()
This should return with the status 1, which means it worked.

Debug on the console. The debug information will help! ;)

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)
pajju's avatar
565
pajju
answered 11 years ago, updated 11 years ago
link

Comments

Thanks, I've done it and It returns status 1, and email was sent (I've sent an email to myself). But using askbot, users do not receive emails when a questioin is answered. I've checked all subscriptions to "instant". Also, there are no messages on mail.log I've sent a message using the feedback form and the message was sent.

nicanorl's avatar nicanorl (11 years ago)
see more comments