The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cpanel notification templates

Discussion in 'User Experience' started by igalro, Nov 25, 2015.

  1. igalro

    igalro Registered

    Joined:
    Mar 18, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. cPAndrewHodge

    cPAndrewHodge cPanel UI Developer
    Staff Member

    Joined:
    Dec 10, 2012
    Messages:
    52
    Likes Received:
    3
    Trophy Points:
    8
    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?
     
  3. igalro

    igalro Registered

    Joined:
    Mar 18, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1

    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
     
  4. cPAndrewHodge

    cPAndrewHodge cPanel UI Developer
    Staff Member

    Joined:
    Dec 10, 2012
    Messages:
    52
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    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 %]
     
  5. cPAndrewHodge

    cPAndrewHodge cPanel UI Developer
    Staff Member

    Joined:
    Dec 10, 2012
    Messages:
    52
    Likes Received:
    3
    Trophy Points:
    8
    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.
     
  6. igalro

    igalro Registered

    Joined:
    Mar 18, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1

    Hey,

    Using your example worked fine for me.
    Thanks!!

    Igalro
     
  7. igalro

    igalro Registered

    Joined:
    Mar 18, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

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

    Thanks!
    Igalro
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page