This guide will show you how to setup BookStack to send an email notification, when an entity changes, to anyone who marked the entity as a favourite.
Create the files below in your bookstack/themes/custom/ folder.
The favourite_notification.php must be in the folder `themes/custom/resources/lang/en/'. Add other languages as needed.
Add the theme to your .env file:
APP_THEME=customAdd the namespace to your composer.json autoload section:
{
"autoload": {
"psr-4": {
"Custom\\": "themes/custom/"
}
}
}Finally run composer update to generate the autoload.php.
- Favourite an entity (shelf, book, chapter, page)
- Edit the entity, then save
- An email will be sent
This code was sponsored by Aussie Broadband: Australia's Leading nbn™ Internet Provider
Can't get this working under 22.11 and 23.01. Every action using BookStack is commented with "An unknown error occurred" until I remove/rename themes/custom/function.php. No mail is generated. No entry in webservers error.log.