So, a configuration option to add a subject prefix will be very much helpful.
But unfortunately, there is no such configuration option in FengOffice (In the latest version while writing this post, may be this will be added in a future version)
In 'application/models/notifier/Notifier.class.php', I found that there are scope for hooks that can be used in this purpose:
Hook::fire('notifier_email_subject', $subject, $subject);
So, I created a the hook 'notifier_email_subject' to add subject prefix.
I created a new file 'application/hooks/notifier_hooks.php' with the following contents:
<?php
function fengoffice_notifier_email_subject($subject, &$ret) {
$ret = '[FengOffice] ' . $subject;
}
?>
So, [FengOffice] prefix will be added to all notification emails. Because of using hooks, I did not have to modify the core FengOffice code.
The advantage would be, when we update FengOffice version in future, the notifier will not be effected. If I had changed core code, that would be lost because of update.
1 comment:
Thanks for this solution. Do you have an idea to include the assigned workspace name as subject?
Post a Comment