Notification Email Preview Script
At the moment, it is incredibly difficult to test individual notification templates sent by cPanel. The only way to test the notification is to make a modification to a user account already active in the system, and hope that cPanel sends out the email for that particular notification correctly.
Testing modifications to the "bandwidth exceeded" template, for example, requires an administrator to change an account so that it is close to (or exceeding) its bandwidth limit and then simply wait until cPanel notices the bandwidth usage and sends out its notification to the user. If the template is faulty, then more than likely, the email notification doesn't get sent at all, and the developer has to go crawling through the logs to find out what happened.
In lieu of a full-blown notification template design tool in WHM/cPanel, this feature request proposes a script that could be run from the command line to test an individual template, using the list of templates in the Notification Templates section of the documentation.
Perhaps, something along the lines of:
- /scripts/testnotification --template=BandwidthUsageExceeded/User.html.tmpl --to=person@email.com
The script could perhaps pre-fill all the email variables with demonstration values to make it even easier.
If any errors were encountered with the template or delivery of the email, they could be displayed to the user at run-time, allowing a developer to quickly ascertain any problems with the notification system.
We actually have an internal tool that we use for this. It would require some work to finesse it and publish it for public consumption. The end result looks something like this:
And it utilizes the current server settings for notification types and priorities so we can test those configurations.How useful would that be in its current state?
Dustin Scherer (he/him) | Product Owner | @dustinscherer
We actually have an internal tool that we use for this. It would require some work to finesse it and publish it for public consumption. The end result looks something like this:
And it utilizes the current server settings for notification types and priorities so we can test those configurations.How useful would that be in its current state?
Dustin Scherer (he/him) | Product Owner | @dustinscherer
Replies have been locked on this page!