Creating an email account with UAPI error
Hello!
I am fairly new to development. I am attempting a basic call to create an email address. There are three parts that I need for the liveapi, as far as I understand. I have the index.php with the form, the formhandler.php to reach the last script, addmail.livephp that is in the theme directory.
I am getting a 500 error, and there are no useful error logs as far as I can find that let me know what is going wrong.
(yes I know that I am not using best practices for form input right now, I will be sanitizing and validating input after I can get it working)
Here is what I have:
addmail.livephp
located at /usr/local/cpanel/base/frontent/paper_lantern
;
$password = $_POST['password'>;
$cpanel = new CPANEL();
$get_userdata = $cpanel->uapi(
'Email',
'add_pop',
array(
'email' => $username,
'password' => $password,
'quota' => '0',
'domain' => $domain,
'skip_update_db' => '1',
)
);
?>
------------------------------------------------
index.php
located at public_html
username:
Password:
--------------------------------------------------
formhandler.php
located at public_html
Any guidance would be greatly appreciated!-
Apologies for the readability of the code, I am unable to edit my message to break the files into separate code blocks or edit my post in any way as the forum marks it as spam or inappropriate. 0 -
I'd suggest reading the Guide to the Live API System including Guide to the LiveAPI System - The set_debug() Method - Developer Documentation - cPanel Documentation and Guide to the LiveAPI System - The get_debug_log() Method - Developer Documentation - cPanel Documentation You might also check the cPanel error logs at /usr/local/cpanel/logs/error_logs 0
Please sign in to leave a comment.
Comments
2 comments