Tags:
create new tag
, view all tags
Keith Helfrich asked in EmailAllTWikiUsers:

Is there a way to email all (registered) TWikiUsers in one shot - regardless of whether they have registered in WebNotify or not ? It would make sense if only members of the TWikiAdminGroup could do this - but would also be very useful for me

My answer is "not as far as I know". Keith suggested my MailerContrib might be the place to do this, so I started thinking about requirements:

  1. Must support capture of a mail that will be sent to all TWiki users,
  2. Must restrict access to this function to TWikiAdminGroup only,
  3. Must not expose email addresses (other than their own) to recipients,
  4. Should not expose email addresses or recipients to the sender,
  5. Should be done in a plugin or extension, so nobody has to wait for the next TWiki release,

I'm not at all sure the MailerContrib is appropriate for this, as there is no simple way to restrict access to this function to members of the TWikiAdminGroup. Maybe there's another plugin that is more appropriate to the requirements? e.g the SendEmailPlugin?

-- Contributors: KeithHelfrich, CrawfordCurrie - 09 Mar 2008

Discussion

SendEmailPlugin's functionality is available to anybody who can access the site it is installed on. So it seems it could easily be misused as an anonymous mail relay.

-- MichaelDaum - 09 Mar 2008

one solution could be a command line script (runnable only by people with accounts on the machine) emitting a list of email in formats suitable for inclusion in the major mailing list software (/etc/aliases, mailman, google groups, ... default being one email per line). Thus you would delegate the tricky privacy issues to the mailing list software

-- ColasNahaboo - 09 Mar 2008

imagine the fun that doing this on twiki.org (or any similarly sized TWiki) would be. When I did the mass scripted mailouts for the security issue, I had to chunk up the outgoing emails, and also, it took several hours to send them all out.

While we need to find a solution - perhaps we should also limit its scope to worrying about smaller user sets?

Essentially though, it

  • won't be something that can run from cgi (as you will get session timeouts),
  • must be restartable (so you don't send out the email to the same person multiple times)
  • must...

Is there a CPAN module that abstracts mailinglist controls ala DBI ? or should this actually be implemented as a plugin handler to the registration code, which adds a user to a mailing list automatically when they register??

If we use a registerHandler, and subscribe the user to a mailing list, they can then opt out, and emailAllTWikiUsers becomes a single, trivial MailerContrib NewsNotify like extension.

-- SvenDowideit - 18 Mar 2008

Hello all. I'm still feeling the pain of not being able to email all twiki users. As an administrator, there are various reasons to need to be able to email all of my users.

I've had this in my back-brain for a while, and I think the best answer would be to build a solution that allows the admin to email specific TWikiGroups.

By giving admins the ability to email groups, we could:

  • avoid performance probs on large sites like twiki.org by breaking the user base up alphabetically into groups by user name
  • send multi-lingual communications to the correct recipients (Spanish newsletter to the SpanishGroup, English newsletter to the EnglishGroup)

That's my recommendation for how to approach. But no matter how it's done, I think it is really important that an adm be able to blast communications out to his user base.

Ideally (in a perfect world) I would be able to use an existing TWikiTopic as the email body. This would facilitate pretty formatted newsletters instead of ugly boring plain text. And it would also facilitate keeping an archive of old communications inside of the TWiki itself.

That is, everything between the %BEGINMAIL% and %ENDMAIL% tags would be wrapped into an HTML formatted mail body & sent out (images and text formatting, included).

Thoughts ?

-- KeithHelfrich - 14 Jun 2008

ok, first up, you don't need new %BEGINMAIL% and %ENDMAIL% tags - named SECTIONS would reuse an existing set of markers, and then being able to tell the mailer what topic (and optionally SECTION in that topic) would be more flexible.

Next, well, emailing Groups exists in MailerContrib already i think, and there are 2 modes in that contrib - the WebNotify, and the "news" mode, which "The entire content of a specific topic or set of topics".

While the documentation of MailerContrib emphasises running the mailnotify sript on a regular interval, There's nothing preventing you from running it whenever you need. (in News mode, the email is sent in HTML form - hopefully not exclusivly in HTML as that is an incorrect thing to do.)

It looks like TWiki can already do it - though as usual, making the UI more obvious will help us all.

In Summary, to send a monthly Newsletter, in pretty HTML, you can subscribe a TWikiUserGroup to your MonthlyNewsLetter topic (appending an ! to the topic name to trigger 'news' mode). (and then make sure you have a 'news' mode mailercontrib cronjob.)

I'd like to thank you for your question - I've never looked into the documentation of MailerContrib before - but having now skimmed it, I have a little more of an idea of what I can do with it smile

-- SvenDowideit - 15 Jun 2008

Sven, you're right. It looks like the MailerContrib is exactly what I was looking for. This is true in the docs even down to the %STARTPUBLISH% and %STOPPUBLISH% markers.

But I see that I'm on a really old version of MailerContrib (rev 12496), so I'll have to fix my side up first, before I cry for help because it doesn't work smile Thanks for reading through the docs. From the advertising, MailerContrib sounds really great...

-- KeithHelfrich - 15 Jun 2008

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2008-10-27 - SvenDowideit
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.