Option to remove or alter sitename prefix from email subjects

8 years 4 months ago #253327 by nvanadrichem
Currently the subject of all CB system notifications and mass emails are prefixed by the sitename followed by a dash.
For example, the pending sign-up request looks as follows:
"My Site Name - Your sign up request is pending approval"

As our sitename is rather large and embedded in the name of the sender, this is redundant for us to send with every email (especially if you send a mass email, as you edit the subject on the fly).
Hence, it would be convenient if this became optional and/or editable by CB configuration or instead set equal to the Joomla->Users Manager->Mass Mail->Subject Prefix option (if exists, else omitted).

For now, we removed the following line from /libraries/CBLib/CB/Legacy/cbNotification.php:
$subject = $_CB_framework->getCfg( 'sitename' ) . ' - ' . $subject;
But this introduces manual work at updates.

In order to set it equal to the Joomla Mass Mail Subject Prefix, which should be the easiest to do, I think you could use key 'mailSubjectPrefix' in getCfg() and test it to see if it is empty before adding the ' - ', but I have not tried it myself.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.158 seconds

Facebook Twitter LinkedIn