create new tag
, view all tags
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 smile for solutions smile

Suggestions: (append yours, but do not change order of existing ones)

  1. 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.
  2. 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
  3. done Do not send email to TWikiGuest to avoid triggering mail errors
  4. done Do not send email for webs not beginning by a capital letter (e.g: _default ...)

-- ColasNahaboo - 26 Mar 2002

I coded suggestion 1: now you can just type
   * Main.YourName
instead of
   * Main.YourName - email@address.com

in WebNotify topics and have the mailnotify script automatically fetch the email(s) from users home page.

Replace the code for getEmailNotifyList in lin/TWiki.pm by EmailFromHomePage.modif: new source of function TWiki::getEmailNotifyList

-- ColasNahaboo - 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 bin/mailnotify that I named mailnotify2 so you can try it without breaking the normal script.

To use it, just drop mailnotify2: standalone remplacement for mailnotify in your bin/ dir and run it as you would have called mailnotify

You do not need to apply the above EmailFromHomePage.modif patch. It will work with or without it.

-- ColasNahaboo - 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 webmaster@your.company since all our webs had this default entry in place.

-- MartinWatt - 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.

Are TWikiBetas or TWikiReleases stored in a separate CVS tree to TWikiAlpha? How is this process managed?

-- MartinCleaver - 07 Sep 2002

Well, I would like to implement all the points (help welcome :~) before we change the notification system. 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.

-- ColasNahaboo - 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 smile

-- MartinWatt - 09 Sep 2002

Ok, I have updated my patch against the last beta. Core developers, you can just replace bin/mailnotify by the attached mailnotify2.beta (I provided also the diffs).

-- ColasNahaboo - 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.

-- PeterKlausner - 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 writeDebug calls. We should really have some PatchGuidelines so that people can produce TWikiPatches that are easily incorporated into the core code.

-- RichardDonkin - 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:

    * Main.UserName
    * Main.GroupName

The 'UserName' format (i.e. no Main webname) is not allowed (I don't think we should encourage WikiNames in WebNotify that aren't hyperlinks). Also, '%MAINWEB%' is now OK as a WikiName prefix, instead of 'Main'.

-- RichardDonkin - 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.

-- PeterThoeny - 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 smile

UPDATE: 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.

-- RichardDonkin - 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%?

-- GrantBow - 06 Jan 2003

Category: TWikiPatches

Refactored out all the incomplete items into seperate FeatureEnhancementRequests, and changed to FeatureDone.

-- WalterMundt - 08 Jan 2003

Thanks for refactoring this, Walter. So specifically, what other TWiki web topics need updating?

-- GrantBow - 28 Jan 2003

Since this feature is done, I have opened a new topic for an enhancement to it: OmittingEmailInWebNotifyV2 -- ColasNahaboo - 08 Aug 2003

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmodif EmailFromHomePage.modif r1 manage 1.2 K 2002-05-03 - 15:17 ColasNahaboo new source of function TWiki::getEmailNotifyList
Unknown file formatdiff mailnotify.diff r1 manage 0.9 K 2002-10-04 - 09:21 PeterKlausner allow schedule per web
Unknown file formatEXT mailnotify2 r1 manage 8.6 K 2002-05-07 - 17:04 ColasNahaboo standalone remplacement for mailnotify
Unknown file formatbeta mailnotify2.beta r1 manage 8.8 K 2002-09-10 - 13:50 ColasNahaboo remplacement for mailnotify for beta 2002-08-03
Unknown file formatdiffs mailnotify2.beta.diffs r1 manage 5.4 K 2002-09-10 - 13:51 ColasNahaboo the diffs agaisnt mailnotify for beta 2002-08-03
Edit | Attach | Watch | Print version | History: r22 < r21 < r20 < r19 < r18 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r22 - 2005-02-15 - SamHasler
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.