Of course! (sorry - I should have thought of this by myself... ;) The code is attached (sorry for the ugly formatting) or given in [1] at member function 'send_mailnotification'.
I have also to say, it's using 'trunk' (not re-write) and rev. 8990. The 'while' loop was introduced to do 3 re-tries (brute force) but does not help at all. My next idea would be to include the creation of the user object usr = userlib.User(pywikibot.getSite(), error_mail[0]) also into the loop, but this would also be simple trial'n'error (brute force). This is because I have no idea where the problem originates from. Is it because of wrong/old token, wrong flags, ... ?!? [1] http://toolserver.org/~drtrigon/websvn-2.3.1/filedetails.php?repname=drtrigon&path=%2Fpywikipedia%2Fbot_control.py Greetings Am 24.07.2011 12:19, schrieb Merlijn van Deen: > Could you post the code you are using to send emails? > > On 24 July 2011 11:22, Dr. Trigon <[email protected] > <mailto:[email protected]>> wrote: > > Hello all! > > I am searching desperately for a solution to following problem. > DrTrigonBot is written such that in case of an (not severe) error > the bot should send an email with a notification to me. BUT the > strange thing I do not understand is; userlib.py is not able to > send emails about 50% of the tries... > > Some info can be found in (at the very end): > http://toolserver.org/~drtrigon/DrTrigonBot/20110724.log > > The error raised is > 'UserActionRefuse("You don't have permission to send mail",)' > > Does anyone have an idea how to solve this? In my view this is > triggered by "if not self.site().isAllowed('sendemail'):" in > "userlib.sendMail" but WHY is this 'sendemail' flags sometimes > true and sometimes false...?!? > > Thanks a lot for your help and time > Greetings to all! > DrTrigon > > _______________________________________________ > Pywikipedia-l mailing list > [email protected] > <mailto:[email protected]> > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l > > > > > _______________________________________________ > Pywikipedia-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l _______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
