Forum OpenACS Development: Adding email alerts to general comments
a) allow general-comments to accept an optional list of email addresses. When provided, the general-comments page will display an toggle switch on the general comments page, which allows someone to optionally send email to everyone. It wouldn't give out the email addresses, just give them the option to send an email alert.
b) copy the general-comments code to project manager, and do something similar to (a), but don't do it universally.
Biggest disadvantages I can think of:
x) general comments becomes dependend on acs-mail-lite
y) adding in the email addresses to send email to as a list is kludge-like. And perhaps not even scalable. I'm not sure what would happen if the list were a mile long for example.
However, every time I've brought this up in the past, nobody has suggested anything that seemed like a better solution.
I'd like any future general-comments package to provide this sort of support, so I'm hoping that we can come up with an easy to implement solution.
General comments are usually created using the general_comments_create_link proc, which makes a URL for the person to click on. The biggest problem with the approach I've outlined so far is that if I pass in the email addresses, they have to go into the URL, which leaks the email addresses. That's fine for the application I'm working on, but I think others might consider that to be a bug.
So maybe the best option is for project manager to have it's own comment creation page. After the comment is created, then it will send out an email. It's easy to do this within project-manager -- I was just hoping to solve a general problem instead of just a specific one.
If anyone else has a better idea, I'll implement it this right now. But otherwise, I'm going to just stick this code in project-manager.
In this case it seems that you should be investigating ways to integrate notifications into general comments. Notifications gives the user a single place to control the alerts they get from an OpenACS site. There is also support for SMS alerts floating around (not sure that will go into our standard code because there's not one standard way to do it as there is with e-mail), and probably there will be support for other types of alerts added by folks in the future.
The notifications paradigm is that the user controls what they get, rather than (say) the author of a comment. Though of course there's nothing that stops a package from allowing its admins to add notifications for a user or to even add notifications silently (the homework package sets up automatic notifications to tell a student when a professor's comments have been uploaded, for instance).