Feng Forum

Other Topics => Ideas => : glueball February 19, 2009, 11:02:58 AM

: Add a Prefix to mail Notifications Subject
: glueball February 19, 2009, 11:02:58 AM
Hi all,
We have made a change, adding a prefix to the subject line to facilitate filtering on our mail clients. I believe this would be a nice thing to have for more people. The way it was done might not be the best, but here it is:
(1.2 RC2):
config/config.php adedd:
define('MAIL_PREPEND','[OpenGoo] - ');

application/models/notifier/
Changed:
 Notifier.class.php:551:         $result = $mailer->send($to, $from, MAIL_PREPEND.$subject, $body, $type, $encoding);

Kyriacos

-with apologies if someone already did/posted about something similar
: Re: Add a Prefix to mail Notifications Subject
: ignacio February 19, 2009, 12:58:32 PM
Good idea. If more people request it we will include it on the official release.
: Re: Add a Prefix to mail Notifications Subject
: rx2 February 19, 2009, 05:54:28 PM
We'd love to see the Workspace in the subject line. Is there a quick way to do that?
: Re: Add a Prefix to mail Notifications Subject
: ignacio February 23, 2009, 07:57:28 PM
It's not easy, because some objects can have multiple workspaces and others have only one workspace. For objects that can have more than one workspace you may have some security issues, as you may be showing to some users workspaces that they shouldn't know about.

Technically though, it can be done by adding a couple lines of code.
: Re: Add a Prefix to mail Notifications Subject
: glueball February 24, 2009, 05:27:58 AM
Our original idea was to simply provide a way to do filtering in our mail clients, the inclusion of other elements, in a sense is a different modification.

With regards to the security issue of multiple Worspaces that could possibly be handled by sending only the "current" workspace, that is the workspace in which the user was in when the email alert was triggered.

Of course I am not that familiar with the code so the above could be wrong/hard/nonsense.
: Re: Add a Prefix to mail Notifications Subject
: ignacio February 24, 2009, 05:20:11 PM
The problem with using the current workspace is that it can be 'All' or any parent workspace of the workspace where the object lies, so in many cases you won't be able to tell from which workspace the notification was triggered.