Not only can you experience AnswerHub firsthand, but you can also ask and explore questions and answers about AnswerHub.
To get started, try typing a question in the search bar. If your question hasn't been asked, try posting a new question.
I had email working ok, but I wanted to change the format of the validate email link. I was changing this and the styles and it's stopped working. I've changed back to the original files, but it's still not working. My oops.
However how can I debug this?? I can see in the mail.log that it connects and send the EHLO to the smtp server and then the connection drops. However OSQA is giving me no output or logging as to what is going on. The error log, apache's logs etc. all remain with no information what so ever.
How can I start debugging the issue?
Answer by musmuris · Jan 13, 2011 at 12:16 PM
To do this: Edit .../forum/utils
to the top add
Then at the very end under where it has
except Exception, e: pass
Change that to:
except Exception, e: logging.debug( 'Issue sending email' ) logging.debug( str(e) ) pass
Now if you have logging set up then it should log the error which should help.
Now if only I could accept the answer to my own question!
Answer by justin hamade · Dec 07, 2010 at 06:20 PM
Are you using custom SMTP or just default sendmail? Is it postfix or exim? You can add some logging to your settings file and if there is logging for the mail function then it may show you something, if not you have to add the logging.debug() your self.
My guess would be a SMTP or mail transport error not a Django/OSQA one.
Answer by musmuris · Dec 08, 2010 at 06:03 AM
I worked out that it was mail.py that needed some logging added to debug the issue.
To cut to the chase it was that somehow I'd entered an username and password for the email sending when I didn't need one (the smtp accepts from localhost only etc.) so it was throwing an exception.
The problem is that OSQA was just swallowing this exception and not reporting it to any log file! But that's for another question... ;)