cpanel notification templates

igalro

Member
Mar 18, 2008
6
0
51
Hello,

Regarding For cPanel & WHM version 11.52 - within this article:
Notification Templates - Documentation - cPanel Documentation
it's written that there are notification types: HTML/Plaintext.

My questions/issues are:
1. How can i switch from HTML to Plaintext the new account notification email?
2. When trying to custom the 'new account tempalte', i copied /usr/local/cpanel/etc/icontact_templates/wwwacct/Notify.html.tmpl to:
/var/cpanel/templates/icontact_templates/wwwacct/Notify.html.tmpl
But, it just ignore the new modified tempalte.

Best Regards,
Igalro
 

AndrewH.

Well-Known Member
Dec 10, 2012
52
3
83
cPanel Access Level
Root Administrator
1) The email sends both parts and depending on what your email client can read, it will render accordingly. If you only want to send a plain text you can modify the *.html.tmpl to be in plain text using the template variables as appropriate.

2) Make sure you've copied the entire folder structure. If you did this, are you seeing any errors in the error log?
 

igalro

Member
Mar 18, 2008
6
0
51
1) The email sends both parts and depending on what your email client can read, it will render accordingly. If you only want to send a plain text you can modify the *.html.tmpl to be in plain text using the template variables as appropriate.

2) Make sure you've copied the entire folder structure. If you did this, are you seeing any errors in the error log?

Hello,

Thanks for the prompt answer.

1. So, i can remove everything in the .html.tmpl file and leave only the variables? maybe you have such file as an example?
2. As specified, i'm using the full folder structure path:
i copied /usr/local/cpanel/etc/icontact_templates/wwwacct/Notify.html.tmpl to:
/var/cpanel/templates/icontact_templates/wwwacct/Notify.html.tmpl
3. the error log at: /usr/local/apache/logs/error_log does not show any errors regarding this issue.

Thanks,
Igalro
 

AndrewH.

Well-Known Member
Dec 10, 2012
52
3
83
cPanel Access Level
Root Administrator
Hello,

Thanks for the prompt answer.

1. So, i can remove everything in the .html.tmpl file and leave only the variables? maybe you have such file as an example?
2. As specified, i'm using the full folder structure path:
i copied /usr/local/cpanel/etc/icontact_templates/wwwacct/Notify.html.tmpl to:
/var/cpanel/templates/icontact_templates/wwwacct/Notify.html.tmpl
3. the error log at: /usr/local/apache/logs/error_log does not show any errors regarding this issue.

Thanks,
Igalro
1) Yep.

Example can replace wwwacctconf/Notify.html.tmpl and will send no html:

Code:
[% IF NOTICE.useip == "y" %]
    [% NOTICE.ip_type = CPANEL.locale.maketext('Dedicated'); %]
[% ELSE %]
    [% NOTICE.ip_type = CPANEL.locale.maketext('Shared'); %]
[% END %]

[% IF NOTICE.has_cgi == "y" %]
    [% NOTICE.cgi_support = CPANEL.locale.maketext('Enabled'); %]
[% ELSE %]
    [% NOTICE.cgi_support = CPANEL.locale.maketext('Disabled'); %]
[% END %]

[% IF NOTICE.quota == "unlimited" %]
    [% NOTICE.quota_formatted = CPANEL.locale.maketext('Unlimited'); %]
[% ELSE %]
    [% NOTICE.quota_formatted = CPANEL.locale.maketext('[format_bytes,_1]', NOTICE.quota); %]
[% END %]


                [% CPANEL.locale.maketext('Domain'); %]:
                [% NOTICE.user_domain %]

                [% CPANEL.locale.maketext('[output,abbr,IP,Internet Protocol] Address'); %]:
                [% NOTICE.ip %] ([% NOTICE.ip_type %])

                [% CPANEL.locale.maketext('[output,abbr,CGI,Common Gateway Interface] Access'); %]:
                [% NOTICE.cgi_support %]

                [% CPANEL.locale.maketext('Username'); %]:
                [% NOTICE.user %]

                [% CPANEL.locale.maketext('Password'); %]:
                [% NOTICE.password %]

                [% CPANEL.locale.maketext('[asis,cPanel] Theme'); %]:
                [% NOTICE.cpanel_mod %]

                [% CPANEL.locale.maketext('Home Directory Root'); %]:
                [% NOTICE.home_root %]

                [% CPANEL.locale.maketext('Quota'); %]:
                [% NOTICE.quota_formatted %]

        [% FOREACH nameserver IN NOTICE.nameservers %]
            [% IF nameserver.length %]
                        [% CPANEL.locale.maketext('Name Server [_1]', loop.count); %]:
                        [% nameserver %]
            [% END %]
        [% END %]
                [% CPANEL.locale.maketext('Contact Email'); %]:
                [% NOTICE.contact_email %]

                [% CPANEL.locale.maketext('Package'); %]:
                [% NOTICE.cpanel_package %]

                [% CPANEL.locale.maketext('Feature List'); %]:
                [% NOTICE.feature_list %]

                [% CPANEL.locale.maketext('Locale'); %]:
                [% NOTICE.locale %]

    [% IF NOTICE.env_remote_user == NOTICE.env_user %]
        [% CPANEL.locale.maketext('“[_1]” set up the account.', NOTICE.env_remote_user.html() ); %]
    [% ELSE %]
        [% CPANEL.locale.maketext('The account was set up by the reseller “[_1]” with the effective [output,abbr,UID,user ID] of “[_2]”.', NOTICE.env_remote_user.html(), NOTICE.env_user.html() ); %]
    [% END %]
 

AndrewH.

Well-Known Member
Dec 10, 2012
52
3
83
cPanel Access Level
Root Administrator
2) The next step I would recommend then is to open a ticket. Unfortunately my ability to troubleshoot this is testing it on my development environment and I'm not able to reproduce it so we would need access to figure out what might be causing issues.
 

igalro

Member
Mar 18, 2008
6
0
51
2) The next step I would recommend then is to open a ticket. Unfortunately my ability to troubleshoot this is testing it on my development environment and I'm not able to reproduce it so we would need access to figure out what might be causing issues.

Hey,

Using your example worked fine for me.
Thanks!!

Igalro
 

igalro

Member
Mar 18, 2008
6
0
51
Hi,

Another associated question -
What is the location of the template file of 'new account on' notification in cpanel v. 11.48?

Thanks!
Igalro
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
What is the location of the template file of 'new account on' notification in cpanel v. 11.48?
Hello :)

The path you are looking for is:

/usr/local/cpanel/etc/icontact_templates/wwwacct/

Please keep in mind that cPanel version 11.48 is nearing end-of-life status:

Notice: 11.48 to EOL in 2 Months

Thank you.