Please sign in to comment.
Added a new config option, 'expose user emails', which defaults to tr…
…ue (to mimic old behaviour). If set to false, then all e-mail will come from the site address defined in the Mail From field (or automatically calculated if not set). I also split the code that generates the site e-mail address into a getSiteEmailAddress() function, so that we encapsulate the logic to generate it better - it can now be called from elsewhere, if needed. This will involve a change to the DB data (to add the new option to the config_options table, and to modify the ordering of a subsequent item). I have added the necessary changes to initial_data.sql, but I don't know how to manage updates to existing systems. Here is the code that will need to be run, but I have no idea where to put it, I'm afraid! INSERT INTO `<?php echo $table_prefix ?>config_options` (`category_name`, `name`, `value`, `config_handler_class`, `is_system`, `option_order`, `dev_comment`) VALUES ('mailing', 'mail_expose_user_emails', '1', 'BoolConfigHandler', 0, 12, 'Enable to expose user e-mails in the from/reply-to field, or disable to always use the site address, below.'); UPDATE `<?php echo $table_prefix ?>config_options` SET `option_order` = 13 WHERE `category_name` = 'mailing' AND `name` = 'mail_from';
- Loading branch information...
Showing with 50 additions and 8 deletions.