I began tackling myself the problem of enhancing email notification in TWiki.
I will state here the goals to satisfy and hope to be able to implement them progressively.
As always, help is welcome, either for suggestions or (better
(append yours, but do not change order of existing ones)
- done One should be allowed to just type his name in the WebNotify page. The mail notify script would then fetch the mail from the user page.
- This would avoid typos when typing email adresses, and ease changing email adresses (all in one place), using only the spam-protected one.
- done If the user name is a group name, mail to all the members of the group
- recursively, groups can contain groups
- but not sending twice emails to the same address
- done Do not send email to TWikiGuest to avoid triggering mail errors
- done Do not send email for webs not beginning by a capital letter (e.g: _default ...)
- 26 Mar 2002
I coded suggestion 1: now you can just type
* Main.YourName - firstname.lastname@example.org
topics and have the mailnotify script automatically fetch the email(s)
from users home page.
Replace the code for
: new source of function TWiki::getEmailNotifyList
- 03 May 2002
I now coded suggestions 1, 3, 4, and 5. (now 1-4 above -- WalterMundt
I did them as a remplacement script to
that I named mailnotify2
so you can try it without breaking the normal script.
To use it, just drop
: standalone remplacement for mailnotify
dir and run it as you would have called mailnotify
You do not need to apply the above
patch. It will work with or without it.
- 07 May 2002
Is this patch going to be part of the next TWiki release? It works well, and would be a good addition. Filtering out TWikiGuest is particularly useful - my first attempt at using the existing mailNotify triggered a barrage of bogus emails to email@example.com
since all our webs had this default entry in place.
- 06 Sep 2002
I support the notion that this should be considered for BeijingRelease
. Can rights be given to Colas for him to patch the TWikiAlpha
directly; we can then conduct testing of it in the next Beta.
stored in a separate CVS tree to TWikiAlpha
? How is this process managed?
- 07 Sep 2002
Well, I would like to implement all the points (help welcome :~) before we change the
I suspect implementing all the points will need to change the way notification is currently done, and we'd better do this once.
On granting me access to Alpha release, I dont known. I definitely am not used to perl, so I think my code should be reviewed for efficiency and coherence with the style of the main TWiki code.
- 09 Sep 2002
While it would be great to have all the items on your list, I don't think we need wait for them all before adding anything. What you already have is a useful addition, and as it is a relatively small change to an existing script, it should be easy to review and incorporate. The other stuff can wait for the following release. Always keep the customers wanting to come back for more
- 09 Sep 2002
Ok, I have updated my patch against the last beta. Core developers
, you can just replace
by the attached
(I provided also the diffs).
- 10 Sep 2002
The scheduling problem is a hard one. To begin,
it would be nice to adapt the schedule to the type of material in a web.
So you can have a slow schedule for all webs
and insert extra notification times for individual webs.
Trivial patch below.
- 04 Oct 2002
I have put Colas' latest patch as of 10 Sep 2002 into the TWikiAlphaRelease
, in both mailnotify and TWiki.pm. Tested on Windows, and has been tested on other platforms as well.
The code was quite clean, thanks for a nice patch. It would be helpful if future patches used 4-character indents, like the rest of the TWiki code, but apart from that it was quite conformant to the ReadmeFirst
guidelines. Would also have been easier for me if it had directly patched TWiki.pm and mailnotify, as there were a couple of variable declaration issues on moving the code into TWiki.pm - I converted the debugging print statements into
calls. We should really have some PatchGuidelines
so that people can produce TWikiPatches
that are easily incorporated into the core code.
- 08 Nov 2002
I have done some more work on this patch after comments from PeterThoeny
- turns out the patch removed skin support from the HTML
rendering of the notification message. New code committed to TWikiAlphaRelease
works with nested user groups as well. TWiki now handles WebNotify
entries of the form:
The 'UserName' format (i.e. no Main webname) is not allowed (I don't think we should encourage WikiNames
that aren't hyperlinks). Also, '%MAINWEB%' is now OK as a WikiName
prefix, instead of 'Main'.
- 09 Nov 2002
This is a good enhancement, makes the product more user friendly.
Re: Not allowing "Main." prefix. This could be confusing in the Main web because the link shows up correctly but users don't get notified. This special case should be considered.
- 09 Nov 2002
Good point about the Main web (currently the 'Main.' is required of course) - I was thinking about future conversion issues if RenameMainWebToHome
or similar are implemented in the future, but I think any conversion script could handle either case, so I have now put this back in. I do think it's better to encourage 'Main.WikiName' type links though - since this is the format documented on WebNotify
I don't think many people would try omitting the 'Main.' part. I haven't documented omitting the 'Main.' prefix anywhere, to help discourage using it
: Peter has now implemented this at TWiki.org, so try this out - it's documented at TWiki.TWikiSiteTools
and also at Codev.WebNotify
. Let me know if the docs make sense - please comment on both of those pages.
It would be best to factor out the changes not included currently (all those not marked done
by Colas above), into another page linked from EmailNotificationEnhancements
. The per-topic notification has been implemented by a couple of people, see PerTopicWebNotifyReports
- 10 Nov 2002
The documentation for the BeijingRelease
is not yet started? It says 0% on that page but perhaps that number is innacurate. I must assume the done
markers for items 1, 3, 4 and 5 on the "goal" list at the top of this topic are accurate. I intend to look through this topic more closely, but what other pages need updating in the TWiki
web to reflect this change in functionality? What needs to change to make documentation read 100%?
- 06 Jan 2003
Refactored out all the incomplete items into seperate FeatureEnhancementRequests
, and changed to FeatureDone
- 08 Jan 2003
Thanks for refactoring this, Walter. So specifically, what other TWiki web topics need updating?
- 28 Jan 2003
Since this feature is done, I have opened a new topic for an enhancement to it:
- 08 Aug 2003