How to Suspend Incoming Emails using API2
I need to suspend incoming email for an email account that is only designed for notifications. I tested manually suspending incoming email and the test account was still able to send emails all as desired. However I can not find the API2 documentation for suspending incoming email; how do I do this with API2?
-
Update: UAPI (which is effectively API version 3) documentation starts at . Secondly the suspend incoming email documentation is here: . So I tried it and received the following error: Fatal error: Uncaught RuntimeException: There was a problem fetching the env variablecontaining the path to the socket in /usr/local/cpanel/php/cpanel.php:146 Which led me to an older thread of mine about this exact error: . I added the correct cPanel user name and it's still throwing the same error. I ended up getting the PHP script to create legitimate email accounts in an automated fashion on behalf of users using api2_query and I still don't have a working script using UAPI any where in my code (thanks for Advanced Find and Replace). So here is my code with basic obfuscation: uapi('Email', 'suspend_incoming', array('email' => 'somenotification@example.com')); echo ' '.print_r($result,1).'
'; ?> ..and a reminder, I'm still getting the "...env variablecontaining the path to the socket..." error. What am I missing?0 -
I ended up getting the PHP script to create legitimate email accounts in an automated fashion on behalf of users using api2_query and I still don't have a working script using UAPI any where in my code (thanks for Advanced Find and Replace). So here is my code with basic obfuscation: uapi('Email', 'suspend_incoming', array('email' => 'somenotification@example.com')); echo '
'.print_r($result,1).'
'; ?> ..and a reminder, I'm still getting the "...env variablecontaining the path to the socket..." error. What am I missing?
Hello @JAB Creations, Can you provide the step-by-step instructions of how to reproduce the issue so we can verify if there are any issues with the steps you are using? For instance, include where you are uploading the script to and how you are executing it. Thank you.0
Please sign in to leave a comment.
Comments
2 comments