Testing customised emails?

ManuelT

Well-Known Member
Sep 30, 2005
55
0
156
Is there a way of forcing a test with something like a bandwidth email? since i'm testing some changes and would like to see if there are any issues before my customers sees.

Many thanks in advance.
 

ManuelT

Well-Known Member
Sep 30, 2005
55
0
156
Also if anyone knows any syntax for how to add more data into the emails that would be good.
 

ManuelT

Well-Known Member
Sep 30, 2005
55
0
156
Reply from cpanel is to create an account with a small amount of bandwidth, not really a great solution. Can anyone tell me where to add this as a feature request?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Also if anyone knows any syntax for how to add more data into the emails that would be good.
Are you referring to using a customized e-mail template for bandwidth limit notifications?

What type of data or information are you looking to add into the e-mails for bandwidth limit notifications?

For reference, via root SSH access, here are a few steps that may be used to create "local" (customizable) copies of the bandwidth limit e-mail templates (stored within "/var/cpanel/templates/"):
Code:
# cp -pRv /usr/local/cpanel/src/templates/admin_bandwidth_limit /usr/local/cpanel/src/templates/bandwidth_limit /var/cpanel/templates
# cp -pv /var/cpanel/templates/admin_bandwidth_limit/main.default /var/cpanel/templates/admin_bandwidth_limit/main.local
# cp -pv /var/cpanel/templates/bandwidth_limit/main.default /var/cpanel/templates/bandwidth_limit/main.local
The template files with names ending in ".default" should remain as-is; any customizations should be applied to a copy of the stock-default file that is renamed from ".default" to ".local" such as what is seen in the following example listing:
Code:
# find /var/cpanel/templates/*bandwidth_limit
/var/cpanel/templates/admin_bandwidth_limit
/var/cpanel/templates/admin_bandwidth_limit/main.default
/var/cpanel/templates/admin_bandwidth_limit/main.local
/var/cpanel/templates/bandwidth_limit
/var/cpanel/templates/bandwidth_limit/main.default
/var/cpanel/templates/bandwidth_limit/main.local
Additional reference: cPanel Forums - View Single Post - Possible to edit bandwidth notification emails?
The source files are in /usr/local/cpanel/src/templates

Copy them to /var/cpanel/templates then edit them to your specifications.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter

ManuelT

Well-Known Member
Sep 30, 2005
55
0
156
Are you referring to using a customized e-mail template for bandwidth limit notifications?
Yes

What type of data or information are you looking to add into the e-mails for bandwidth limit notifications?
For Bandwidth limit prehaps expected months use to show if they need to upgrade to a higher plan.

For reference<snip>
Thanks for that, I had most of the information and have made a few adjustments but without reliable testing it's hard to progress. The .local was new to me tho so i'll check it out is there a reason we have to copy the .default then copy it again to .local to make changes?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
For Bandwidth limit prehaps expected months use to show if they need to upgrade to a higher plan.
I believe this might be a good feature request (i.e., showing the month's estimated bandwidth transfer usage in contrast to the account's bandwidth transfer limit); I would consider posting the idea in the following forums area: Feature Requests for cPanel and WHM - cPanel Forums

[...] is there a reason we have to copy the .default then copy it again to .local to make changes?
I believe it is sufficient to setup only the custom template ending in the suffix of ".local"; however, I usually recommend retaining the extra copy of the ".default" template as a backup reference and to quickly compare against (e.g., via the CLI utility "diff") as it would be more accessible being in the same parent directory path (within "/var/cpanel/templates/"). In addition, by having a separate copy of the default template it is easier to compare differences between an existing or older default template and future revisions of the default template and therefore more accurately know what, if any, changes may be needed in the customized local template, more so than if the only copies available are the local customization and the stock-default in the source templates.

Example commands for comparing differences (via root SSH access):
Code:
# diff -us /var/cpanel/templates/bandwidth_limit/main.default /usr/local/cpanel/src/templates/bandwidth_limit/main.default
# diff -us /var/cpanel/templates/bandwidth_limit/main.default /var/cpanel/templates/bandwidth_limit/main.local
# diff -us /usr/local/cpanel/src/templates/bandwidth_limit/main.default /var/cpanel/templates/bandwidth_limit/main.local
 

ManuelT

Well-Known Member
Sep 30, 2005
55
0
156
Sorry for the delay been busy with other things.

I'm still not sure what syntax to use or any var's that I can import. Is there any information you can provide on this?

I've added one of the items to the feature request list, don't want to give away all my business advantage. :)
 
Last edited: