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.

Customizing notification template

Discussion in 'General Discussion' started by swbrains, Aug 19, 2016.

  1. swbrains

    swbrains Active Member

    Joined:
    Sep 13, 2006
    Messages:
    38
    Likes Received:
    2
    Trophy Points:
    8
    Hi,

    I am trying to customize the "changed contact info" notification sent when I create a new account.

    After creating a new account, our script calls savecontactinfo to update the primary and secondary contact email. Although we pass these params to the savecontactinfo call:
    notify_contact_address_change=0
    notify_contact_address_change_notification_disabled=0
    The system still sends a notification that the contact info has changed.

    Since I can't seem to disable this notification, I'm going to try to modify the template for this notification to remove some of the information our customers don't need, which likely confuses them. I reviewed the online documentation to customize the cPanel notification templates, and it says:

    To customize a template, copy the desired template from the /usr/local/cpanel/etc/icontact_templates/ directory to the/var/cpanel/templates/icontact_templates/ custom templates directory, and make your changes to the copy.
    Unfortunately, when I go to /var/cpanel/templates on my server, I don't have an icontact folder. I only see these folders:
    [​IMG]
    Where should I put my customized copy of the original template for cPanel to use?

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,711
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    You can create the directory for the desired template with a command like this:

    Code:
    mkdir -p /var/cpanel/templates/icontact_templates/wwwacct
    Then, copy the desired template from the /usr/local/cpanel/etc/icontact_templates/ directory to the /var/cpanel/templates/icontact_templates/ directory with a command such as:

    Code:
    cp -a /usr/local/cpanel/etc/icontact_templates/wwwacct/Notify.subject.tmpl /var/cpanel/templates/icontact_templates/wwwacct/
    You may also want to copy over the include and wrapper directories if the notification you are customizing uses them:

    Code:
    cp -a /usr/local/cpanel/etc/icontact_templates/include /var/cpanel/templates/icontact_templates/
    cp -a /usr/local/cpanel/etc/icontact_templates/wrapper /var/cpanel/templates/icontact_templates/
    Internal case DOC-7177 is open to improve the instructions on the Notification Templates document.

    Thank you.
     
  3. swbrains

    swbrains Active Member

    Joined:
    Sep 13, 2006
    Messages:
    38
    Likes Received:
    2
    Trophy Points:
    8
    Thanks for the information. I'll give this a try. :)
     
    cPanelMichael likes this.
Loading...

Share This Page