Skip to main content

API Hook for bulk mailbox and forward creation?

Comments

3 comments

  • cPanelMichael
    I am using Cpanel API Hooks for adding mailbox accounts and forwarders.

    Hello, Could you provide an example of one of the hooks that you implemented, and the method you used to create it? Thank you.
    0
  • Murray Trainer
    Hi Michael, Thanks for the reply. We are using a perl module for the Hooks. The hooks for mailbox and forward creation are below. We had some old WHM skins that used API1 hooks but I don't think they get triggered any more. Hope the info below helps. THanks Murray
    my $mail_addpop = { 'category' => 'Cpanel', 'event' => 'Api2::Email::addpop', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addpop', 'exectype' => 'module', }; my $mail_addpop_api1 = { 'category' => 'Cpanel', 'event' => 'Api1::Email::addpop', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addpop_api1', 'exectype' => 'module', }; my $mail_addforward = { 'category' => 'Cpanel', 'event' => 'Api2::Email::addforward', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addforward', 'exectype' => 'module', }; my $mail_addforward_api1 = { 'category' => 'Cpanel', 'event' => 'Api1::Email::addforward', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addforward', 'exectype' => 'module', };
    0
  • cPanelMichael
    Hello, Could you enable debug mode and let us know the output to /usr/local/cpanel/logs/error_log when reproducing the issue? Documentation on how to do this is found at: Guide to Testing Custom Code - Standardized Hooks - Software Development Kit - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.