Hi
I am a very new user. We do use cPanel via our hosting service provider who have suggested that some work I need doing (creating email forwarding records) could best be handled vu UAPI and the add_forwarder functions. Fine - I can understand that.
The trouble is that my minimal code fails
with
I assume that I need to install the UAPI library within Joomla.
Can anyone help with some pointers as to where to find and install that library?
Regards
Nick
I am a very new user. We do use cPanel via our hosting service provider who have suggested that some work I need doing (creating email forwarding records) could best be handled vu UAPI and the add_forwarder functions. Fine - I can understand that.
The trouble is that my minimal code fails
Code:
function replaceMailForwarder($memberName, $personalEMail) {
$forwarder = $memberName . '@conveners.pmhu3a.org.au';
// Instantiate the CPANEL object.require_once "
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
echo '<p style="color:red;">$cPanel ' . __LINE__ . ' ' . __FUNCTION__ . '<br />';
var_dump($cPanel);
echo '</p>';
// Delete the forwarder for [email protected]
$delete_forwarder = $cpanel->uapi(
'Email', 'delete_forwarder',
array(
'address' => $forwarder,
'forwarder' => $personalEMail,
)
);
echo '<p style="color:red;">$delete_forwarder ' . __LINE__ . ' ' . __FUNCTION__ . '<br />';
var_dump($delete_forwarder);
echo '</p>';
die(' dead at ' . __LINE__ . ' in ' . __FUNCTION__);
}
Code:
0 - Class 'CPANEL' not found
Can anyone help with some pointers as to where to find and install that library?
Regards
Nick