|
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? |
|
To do this: Edit .../forum/utils to the top add
Then at the very end under where it has
Change that to:
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! Added to jira with patch file - http://jira.osqa.net/browse/OSQA-522
(13 Jan '11, 12:23)
Musmuris
@Musmuris : Thanks for the update, before trying that, I used gmail account and smtp and it is sending emails, seems to me that there may be a configuration issue with exim send only mail host or what not :-) I will still switch on logging as you have mentioned, do you mean to add the above lines to
(14 Jan '11, 05:48)
rihatum
@Musmuris, I added the lines you have mentioned above to mail.py, for once it broke osqa, I then browsed to /osqa/log/django.osqa.log it had some error saying "indentation or something" it has now disappeared as I replaced the mail.py I had backed up without the lines above.
(14 Jan '11, 07:26)
rihatum
|
|
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. |
|
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... ;) Hi Musmuris, thanks for your input, I have OSQA running on a ubuntu 10.10 box at home, mapped a dyndns name to it, I setup exim send only smtp via http://library.linode.com/email/exim/send-only-mta-ubuntu-10.10-maverick all other PHP based apps are sending email, just not OSQA. your help would be appreciated. I have tested exim sends email fine via the command line, not too familiar with django or python so your help would be appreciated. Kind regards
(13 Jan '11, 10:11)
rihatum
2
@rihatum, I moved your "answer" to a comment on Musmurls answer. Please be sure you choose to comment when replying to an answer. If you post an "answer", then it should answer the original question.
(13 Jan '11, 10:41)
rickross ♦♦
@rihatum I can't recall which file I changed (something like mail.py) but I got it to log the exception it caused. I did asked a related question here: http://meta.osqa.net/questions/6054/osqa-can-swallow-exceptions but sadly I never put it in Jira. I should do that sometime
(13 Jan '11, 12:09)
Musmuris
|