Hi all,
I need to call the Email::listpopswithdisk API function from an event inside the CustomEventHandler.
Certainly due to my lack of Perl knowledge, I just do the following :
But this doesn't work.Code:package Cpanel::CustomEventHandler; use strict; use Cpanel::Logger (); sub event { my ($apiv, $type, $module, $event, $cfgref, $dataref) = @_; return 1 if $module ne "email"; if ($event eq 'addpop' && $type eq 'pre') { my $domain = $cfgref->{'domain'}; # Get the free space for this account my $list = Cpanel::Email::listpopswithdisk($domain, 0, 1); print(STDERR "[CustomEventHandler] $module $event $type\n"); print(STDERR "[CustomEventHandler] $email" . '@' . "$domain ($quota, $password)\n"); } return 1; } 1;
Is it possible to call API function from within CustomEventHandler.pm script ?
If yes, could someone give me some tips ?
Thanks in advance for any help,
Philippe



LinkBack URL
About LinkBacks
Reply With Quote




